Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Applying website specific "templates" to an application

Status
Not open for further replies.

chrisw09

IS-IT--Management
Nov 23, 2005
22
US
I have a website that looks a certain way. I'd like to be able to create a new site that uses the same code but only change it's appearance. Instead of having two sets of code, i would rather create a directory called lets say "templates". Inside that then have directories using the template name for the folder name. Inside that have common named files to "include" in all my .jsp pages.

Templates
---->blueTemplate
-------->header.jsp
-------->footer.jsp
-------->temp.css
---->redTemplate
-------->header.jsp
-------->footer.jsp
-------->temp.css

I've tried using include but ${tid} will not allow for a "static" include
Code:
<%@include page="/templates/${tid}/header.jsp"/>

I've also tried using import but the .jsp file is not processed, it's just imported into the page
Code:
<c:import url="/templates/${tid}/header.jsp" />

I'm sure there is a simple solution but i've gone completely brain dead.

Any suggestions?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top