tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james_strac...@yahoo.co.uk>
Subject Re: XTags & <jsp:include...>
Date Fri, 19 Oct 2001 08:48:29 GMT
Hi Manuel

I'm  CC'ing the list in case anyone else hits this one too.

Basically in Servlet 2.2 & JSP 1.1 you cannot do a <jsp:include> inside a
JSP BodyTag. The only way to do looping custom tags in Servlet 2.2/JSP 1.1
is to use a BodyTag. So <xtags:forEach> is a BodyTag.

So you cannot do a <jsp:include> inside an <xtags:forEach> tag on Servlets
2.2/JSP 1.1.

Though if you use Servlet 2.3 / JSP 1.2 (such as Tomcat 4.0) you'll be
fine - this restriction has been lifted.

James
----- Original Message -----
From: "Manuel Tromm" <tromm@oTRIs.de>
To: <james_strachan@yahoo.co.uk>
Sent: Friday, October 19, 2001 9:45 AM
Subject: XTags & <jsp:include...>


> Hi James,
>
> I think I've found a bug in the XTags lib.
> Including a JSP-File via <jsp:include page="..." flush="true" />
> within an <xtags:forEach>-Tag will lead to an IOException
> ("Illegal to flush within a custom tag...").
> I use Tomcat 3.2.3. - I've attached two test files to this mail.
> Did I something wrong? - Thanks for your help!  ;-)
>
> Regards,
> Manuel
>
>
>
> <h1>Error: 500</h1>
> <h2>Location: /jsp/form/test.jsp</h2><b>Internal Servlet
> Error:</b><br><pre>java.io.IOException: Illegal to flush within a custom
tag
> at javax.servlet.jsp.tagext.BodyContent.flush(BodyContent.java:87)
> at
>
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:413)
> at
>
jsp.f_00025rm._0002fjsp_0002fform_0002ftest_0002ejsptest_jsp_2._jspService(_
> 0002fjsp_0002fform_0002ftest_0002ejsptest_jsp_2.java:156)
> at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspCountedServlet.service(JspServlet.ja
> va:130)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
>
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.ja
> va:282)
> at
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:429)
> at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:500)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
> at org.apache.tomcat.core.Handler.service(Handler.java:287)
> at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
> at
>
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:79
> 7)
> at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743)
> at
>
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpC
> onnectionHandler.java:213)
> at
> org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
> at
> org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
> at java.lang.Thread.run(Thread.java:484)
> </pre>
>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


Mime
View raw message