At one of my customers I was able to use to build an application with preview functionality of a business critical application.
As usual the business wants this application as soon as possible. So the obvious choice was Spring boot in combination with Thymeleaf.
Spring Boot
Spring boot created spring based applications which can run as a runnable jar, with embedded a Tomcat server. But a Spring boot application can with a few tweaks run on a Websphere Application Server or Websphere Liberty Profile, and in a Docker or on Cloudfoundry (Bluemix or Pivotal).
Google and you will find tons of examples
Thymeleaf
Thymeleaf a templating engine based on Java. It supports layouts and fragments. Fragments are very useful, because you can reuse these fragments in different layouts. The code in one place.
There is an extensive documentation available
Get started
To get started the best way is to head over to the Spring Initializr. You choose your Group, ArtefactId, Package name, packaging and java version.
The big plus of the Spring Initializr is to specify all the additional projects you need for your application. I can reccommand to switch to full version, where you can see which projects you can choose. From SQL, Web, Templating and Cloud projects.
Last thing is to generate the project. It will deliver a downloadable zip file with the correct Java project inside.
Unpack the zip file, open the project in your favourite Java editor, like Eclipse or in my case IntelliJ
Run the code
In IntelliJ under Spring Boot just double click the SpringBoot application. Or in my case I created a Maven run/debug configuration, ‘Spring Boot Run’, with the command line command ‘spring-boot:run’.
And voila, your application is up and running via localhost:8080