Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TemplateProcessingException for #session.getAttribute #209

Open
AnujaDalal opened this issue Mar 4, 2019 · 1 comment
Open

TemplateProcessingException for #session.getAttribute #209

AnujaDalal opened this issue Mar 4, 2019 · 1 comment

Comments

@AnujaDalal
Copy link

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?

@destan
Copy link

destan commented May 9, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants