Master Pages in Java - JDK 1.6
I am building a website in Eclipse Helios using Google App Engine and want to i开发者_如何转开发mplement ASP.NET Master Page like functionality for common code across different pages. Is there something similar in Java?
Updated: I am not a Java developor, after looking at the links in the posted answers, I think Facelets and Tiles Framework offer the template functionality. Which one is the preferred one? Both can run on GAE.
I'm not very familiar with asp.net but a short read on master pages suggest to me that what you are looking for is JSF Facelets. Facelets allows you to define a template with default content and points where template clients can insert there code.
Template clients can fill in these insert points but don't have to fill in all of them or they can add new ones. So you can also build templates on other templates.
Here is an article which should you give a better idea of what JSF templating can do.
Instructions for setting up JSF on GAE are here
I'm not sure about GAE but here's an SO question that has suggestions for Java EE applications.
Update
Here's a list of stuff supported in GAE and according to this SO answer, it seems to support certain versions of JSF as well.
精彩评论