Lee Collins wrote:
>
> Hi all,
>
> I didnot know that you could not put a jsp:include tag in the body of a
> custom tag.
>
> Could someone tell me WHY that is???
>
> I thought as long as you specified that the Body content was JSP then you
> could do ANY JSP.
In JSP 1.1, you can only use <jsp:include> on the top level in a page,
not nested within the body of other action elements. This limitation is
due to the way the underlying Servlet API deals with the response when
including another resource combined with how JSP buffers the response
body. Hopefully this limitation will be lifted in the next version of
the specs.
One way around it is to write your own include custom action, that
makes a new HTTP request to the target resource (using an HttpURLConnection)
and writes the response body to the parent's JspWriter.
Hans
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
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