12

Apache Tiles moved into the Attic in December 2018. So Apache Tiles has retired.

I'm using Spring MVC framework and JSP.

What alternatives are there? I saw Sitemesh, but it is a decorator and I need a template framework.

I want to maintain my tiles and use other framework. It is a big application, so I can't rewrite all my tiles at the same time

Could anybody help me please?

  • A component/JS oriented framework like REACT? Or you're asking something JSP based? – Pablo Santa Cruz Mar 13 '19 at 14:22
  • Yes, I'm asking something JSP based. So I have a lot of jsp. – Diego Sanchez Castillo Mar 13 '19 at 14:29
  • Are you thinking into rewriting your Tiles files for a new framework? Or you want just to maintain your Tiles pages and use another one for new ones? Please, make it clear. – Aritz Mar 13 '19 at 14:44
  • I want to maintain my tiles and use other framework. It is a big application, so I can't rewrite all my tiles at the same time... – Diego Sanchez Castillo Mar 13 '19 at 14:52
  • 6
    Personally I would let Tiles live in the project. Changing the view framework is everything but trivial, specially in large sized projects. As you're using Spring MVC, I would try to take a new path for new views and start designing/implementing REST endpoints which expose your application logic. Then choose a proper modern framework, like React, Angular or Vue, in order to consume that API from the browser. Later on, you'll be able to begin migrating Tiles functionality there. – Aritz Mar 13 '19 at 14:54

2 Answers2

2

With Tiles is in the Apache Attic it does not mean you need to stop using it.

Unless you were depending on it to continue to provide you with new features and improvements.

mck
  • 1,152
  • 10
  • 10
  • 6
    I would like to agree, but I can't. Since `javax.servlet` have been moved to `jakarta.servlet`, the existing tiles dependencies are broken for newer versions of servlet-api. – msangel Dec 29 '20 at 04:51
1

You can try Thymeleaf or Freemarker or mustache. All these libraries has integration with Spring applications and you should get plenty of examples online to get it working with your applications. Below are the links for the respective websites

https://www.thymeleaf.org/

https://github.com/spullara/mustache.java

https://freemarker.apache.org/

Girish NJ
  • 99
  • 1
  • 7
  • Hello, I saw that options but Thymeleaf works with HTML and Freemark and Mustache are incompatible with JSP. – Diego Sanchez Castillo Mar 13 '19 at 14:32
  • 4
    The pendulum keeps swinging back and forth between "client centric" and "server centric". Things like JSP (and Tiles) are "server centric" (not unlike the old IBM 3270 terminals), As mentioned above: you can continue using JSP and Tiles as long as you need to: there's no reason to stop. But for "new projects", consider exposing REST APIs (from the server side), and using "client centric" technologies like Vue or Angular for the front end. – paulsm4 Oct 30 '19 at 20:32
  • Spring 6 (Jakarta EE 9) dropped support for Tiles integration and advises FreeMarker template views or REST architecture. Source: https://github.com/spring-projects/spring-framework/wiki/Upgrading-to-Spring-Framework-6.x – Arthur Borsboom Mar 18 '22 at 11:07
  • FreeMarker doesn't support Jakarta either (hence the limited support in Spring 6+) so Thymeleaf is probably a more suitable choice for projects requiring a template engine. (Thymeleaf now supports Jakarta too) – Paul Podgorsek Jul 16 '23 at 09:45