Link to home
Start Free TrialLog in
Avatar of ddlam
ddlamFlag for Hong Kong

asked on

The best way to include Header & footer

I have certain header and footer but the <title> will change for each page.
What is the best way to inclue Header & footer using JSP.
ASKER CERTIFIED SOLUTION
Avatar of Ryan Chong
Ryan Chong
Flag of Singapore image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of ddlam

ASKER

That approach is quick enough. Let leave this post a bit longer and any idea would be appreciated.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
What actionwang is refering to is struts tiles, which is a web-page layout framework.

Layout framework can dynamically generate pages by combining and intercepting different part of the page(header, menu, body..etc) according to the specified layout without the need of adding <%@ include ..> on every page.

Another good layout framework you can use is SiteMesh.
http://www.opensymphony.com/sitemesh/
http://today.java.net/pub/a/today/2004/03/11/sitemesh.html
http://www.onjava.com/pub/a/onjava/2004/09/22/sitemesh.html