Hi all,

I am including a header and footer on every page to give a consistent top
and bottom menu look. I use compile-time includes instead of run-time. I
prefer a bit bigger servlet with a little more performance than the runtime
chaining from one servlet to the next, plus the compile-time makes sure any
variables I declare in one include (or above it) are usable throughout the
entire page.

Anyways, I am deploying using two (or more) web-apps in one container. I use
a contextPath to indicate where a resource is, so I want to do something
like this:


<%
  String contextPath = request.getContextPath();
%>


<%@ include file="<%= contextPath %>/path/header.inc" %>

stuff..

<%@ include file="<%= contextPath %>/path/footer.inc" %>

Is this possible to include a dynamic variable? I get errors right now, so
the question is, is there any way to do this?

Thanks.

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to