Is it possible to write java code in Thymeleaf template like JSP Scriplets?

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Is it possible to write java code in Thymeleaf template like JSP Scriplets?

shukdebp
I am not able to execute java code in Thymeleaf template. Can anybody help me?
Reply | Threaded
Open this post in threaded view
|

Re: Is it possible to write java code in Thymeleaf template like JSP Scriplets?

Zemi
Administrator
By now (21st century) is considered a bad practice to execute Java code inside a view.

Any serious template engine would prevent doing it.

Take a look at
   http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller
   http://en.wikipedia.org/wiki/Post/Redirect/Get