SpringSource/spring-webflow-samples — pull request #5 by danielfernandez (2012-12-31 03:28:55+00:00)
Title: Replace JSP with Thymeleaf

This pull request replaces the current JSP interface with a Thymeleaf-based one. Features of the new interface:

* Changes:
* **No Java code was modified**
* Spring MVC configuration modified (new Thymeleaf + Tiles 2 ViewResolver)
* All JSP files removed, replaced by completely equivalent Thymeleaf HTML files.
* Minor fixes to several Spring XML configuration files (XSD file versions)
* Tiles `views.xml` files modified to point to the new thymeleaf templates.
* Refurbished `pom.xml` file.
* Software versions:
* Spring Framework 3.2
* Spring Security 3.1
* Spring WebFlow 2.3.1
* Thymeleaf 2.0.15
* Apache Tiles 2.2.2
* Thymeleaf special integration modules used
* `thymeleaf-extras-tiles2` for integration with Apache Tiles 2
* `thymeleaf-extras-springsecurity3` for integration with Spring Security 3
* `thymeleaf-extras-conditionalcomments` for processing IE conditional comments

Application behaviour and flows remain exactly the same, including AJAX calls etc. Also, although the templating technology has changed, the structure of templates has been kept and for every old `.jsp` file there is now a new Thymeleaf `.html` file with the same name, rendering exactly the same fragment of markup.

**_Natural Templating_**: All templates are can now be statically open in a browser as normal `.html` files. Static styles have been added to them so that their design can be examined without running the application on a server (note this ability is reduced due to the use of Apache Tiles 2, which encourages the use of many small, fragmentary templates; and also the fact that many `.css` and `.js` files are served in runtime from the `spring-js-resources.jar` file).

In this application, the benefit of the _natural templating_ approach can be especially seen in template files containing a form like `login.html` or `hotels/booking/enterBookingDetails.html`, and comparing them to the results of opening their `.jsp` counterparts statically in a browser.