Created byFangon October 28, 2011 13:49:40
Last update: October 30, 2011 19:23:25

This is a simple example to demonstrate the templating power of JSF facelets. If you've used struts tiles before, you'll recognize the simplicity of templating with facelets. I've stripped out everything else except the pages themselves, just to put our focus on facelets. This is a Maven based project, and you need Tomcat (or any servlet container) to run the resulting webapp. To begin with this is the list of files: ./pom.xml ./src/main/webapp/home.xhtml ./src... I left faces-config.xml in there for completeness sake, it may not be needed. The Maven POM ( pom.xml ): <?xml version="1.0" encoding="UTF-8"?> <project... Web app configuration ( WEB-INF/web.xml ): <?xml version="1.0" encoding="UTF-8"?> <web-app... Empty WEB-INF/faces-config.xml : <?xml version="1.0" encoding="UTF-8"?> <!-- Thi... index.jsp is simply a redirect to home.jsf : <% response.sendRedirect("home.jsf"); %>...