thymeleaf-spring icon indicating copy to clipboard operation
thymeleaf-spring copied to clipboard

TemplateProcessingException for #session.getAttribute

Open AnujaDalal opened this issue 6 years ago • 1 comments

ThymeLeaf 3.0.9, Spring-Webflow. Bit new to Thymeleaf. I am getting following exception only in production environment.

org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating SpringEL expression: "(#session.getAttribute('userExists'))" (template: "fragments/loginForm" - line 6, col 8)

Line of code that is affected is:

<div th:if="${(#session.getAttribute('userExists'))}">
...
</div>

Locally it runs correct. On production it fails badly.

I understand that #session is only available in webcontext. Is my application running as standalone on production? Or is something wrong with syntax?

AnujaDalal avatar Mar 04 '19 06:03 AnujaDalal

I believe this is an application problem and solved in SO https://stackoverflow.com/questions/54961520/thymeleaf-occasional-error-using-session-exception-evaluating-springel-expre hence we can close this issue.

destan avatar May 09 '19 12:05 destan