Announcement Announcement Module
No announcement yet.
Should I use Thymeleaf or JSP for the HTML layer? Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Should I use Thymeleaf or JSP for the HTML layer?

    I'm creating a webapp using Spring MVC, and I already programmed some JSPs for displaying data...

    The problem is that some colleagues of mine talked to me about a template engine project called Thymeleaf [ ], and I read this comparison between it and JSP and it looks so good!

    Nevertheless, it still seems to be in beta, so I'd like to ask: does anyone know it? Anyone there already using it? Any words about advantages/disadvantages with JSP?


  • #2
    Although I don't have any experience from real projects (it's on the top of my libs-to-check-list), I would recommend Thymeleaf as a templating engine - it's somehow similar to Velocity, especially in that its implementation is not a part of application server but can be included in your WEB-INF/lib and it's a good thing. Also it seams more integrated with Spring (SpEL, plugins) than Velocity.
    Let me know how it worked for you!

    Grzegorz Grzybek
    Last edited by Grzegorz Grzybek; Jul 6th, 2011, 02:10 AM.


    • #3
      Thank you. I am reading the tutorial and it looks much better than JSP, especially the internationalization tools and HTML5 support. Anyway, for using it in my project I think I'll probably wait until they release a stable version because don't want to have API changes, and being a beta these might happen...


      • #4

        Thanks for your interest in Thymeleaf. I am the author of this library, and I just wanted to let you know that the first stable version (1.0.0) will be released very soon (most probably in just a couple of weeks).

        I hope you like the technology. I am pretty sure that once you learn it you will never feel the need to go back to JSP again!



        • #5
          Thanks for

          Also i started to use thymeleaf framework. Maybe by the time it can be part of springsource mvc


          • #6
            I've written in July that I'm going to use Thymeleaf. It's February 2012 and I'm happy to say that Thymeleaf is now a view technology in large, governmental web application in Poland! It works like a charm! With natural templating I've prototyped some HTML pages, used them in a project document and then, without any converters, generators I've used these templates in final version!

            Log messages are wonderful, it's all clear and beautiful - as I say - "zero entropy" - no chaos (as with JSPs and taglibs/tagdirs). I have one template named "_controls.html" which contains all form controls (text, dates, ...) which use jquery - and gues what - the work offline (just opened in browser) too!

            So everyone - start using Thymeleaf!