Hans Bergsten wrote:
> One way I can think of is to use a common "wrapper" JSP page
> that includes the before and after stuff, plus the real JSP
> page, e.g.
>
>   <jsp:include page="before.jsp" flush="true" />
>   <jsp:include page="<%= request.getParameter("mainJSP") %>" flush="true"
/>
>   <jsp:include page="after.jsp" flush="true" />

This seems like an excellent idea to me.  It would allow me to accomplish
what I want without having to change any of my existing JSPs.  Additionally,
it is much less error-prone than having to include files at the top and
bottom of every JSP.

However, can anyone think of any "gotchas" with using "jsp:include" on JSPs
that were not originally intended to be included by another JSP?  I know
that using RequestDispatcher.include() from a servlet restricts one from
setting response headers and the response code -- will this present any
issues with JSPs?

Thanks.

--
Stephen A. Williams
HNC Telecommunications Solutions

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
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