Basic JSP Templates
Jul 05, 10 by Juan Lebrijo about blog, Eclipse, Java, Web
There is a very basic choice for templating creation with JSP based on "includes. It could be useful to response quickly to a client, very little project, avoid to use heavy technologies, or we want to deploy our project on every application server. The technique creates little JSP code chunks for header and footer. After create all pages from a template. With our Eclipse go to New ... > Dynamic Web Project, we will call basic_templating The basic template for every page will be:

Then we can define all chosen styles in the file /style/templates/styles.jsp:
    

The header and footer for all the application will be: /style/templates/header.jsp /style/templates/footer.jsp We can see the result in the following screenshot:
basic_templating.thumbnail.png 15.8 KB
I keep the project in this eclipse zip file