You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Tuomo Syvänperä <tu...@kolumbus.fi> on 2002/02/20 12:00:03 UTC

Struts + Tiles..

Hi..
I know you must be sick and tired of these stupid questions about struts 
& tiles but I have a problem (imagine that).
I keep getting java.lang.IllegalStateException from tomcat when using 
tiles. At first I thought I had just done something wrong when using 
tiles, but it seems that even a simple page as described below throws 
this exception.
I have a test.jsp file:
<%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>

<html>
<body>
<tiles:insert page="foo.jsp"/>
</body>
</html>

And foo.jsp only includes the line 'foo' in it.

Now when I access the page test.jsp I get the following error:
[12:46:48,164,EmbeddedCatalinaServiceSX] 
ApplicationDispatcher[/emedia.war] Servlet.service() for servlet default 
threw exception
java.lang.IllegalStateException
	at 
org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:109)
	at 
org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1143)
	at org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679)
	at 
org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:570)
	at 
org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:493)
	at 
org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:818)
	at 
org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:390)
	at 
org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:757)
	at org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:369)
	at org.apache.jsp.test$jsp._jspService(test$jsp.java:73)
	at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at 
org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202)
	at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
	at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
[SNIP]

I'm using JBoss 2.4.4 with embedded Tomcat 4.0.1 and using the latest 
(20020219) nightly build of struts and latest development build of tiles 
which I downloaded from tiles homepage.
I have defined the controller as TilesRequestProcessor in 
struts-config.xml and in web.xml I have ActionComponentServlet as the 
action component.

Thanks.
Tuomo


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Struts + Tiles..

Posted by Tuomo Syvänperä <tu...@kolumbus.fi>.
Okay... Seems to be a problem with tomcat. I tried the same thing with 
orion and it works like a charm. Anybody now about this kind of bug in 
tomcat ? Or is it a bug or a feature :)

/tuomo

Tuomo Syvänperä wrote:
> Hi..
> I know you must be sick and tired of these stupid questions about struts 
> & tiles but I have a problem (imagine that).
> I keep getting java.lang.IllegalStateException from tomcat when using 
> tiles. At first I thought I had just done something wrong when using 
> tiles, but it seems that even a simple page as described below throws 
> this exception.
> I have a test.jsp file:
> <%@ taglib uri="/WEB-INF/tiles.tld" prefix="tiles"%>
> 
> <html>
> <body>
> <tiles:insert page="foo.jsp"/>
> </body>
> </html>
> 
> And foo.jsp only includes the line 'foo' in it.
> 
> Now when I access the page test.jsp I get the following error:
> [12:46:48,164,EmbeddedCatalinaServiceSX] 
> ApplicationDispatcher[/emedia.war] Servlet.service() for servlet default 
> threw exception
> java.lang.IllegalStateException
>     at 
> org.apache.jasper.runtime.ServletResponseWrapperInclude.getOutputStream(ServletResponseWrapperInclude.java:109) 
> 
>     at 
> org.apache.catalina.servlets.DefaultServlet.serveResource(DefaultServlet.java:1143) 
> 
>     at 
> org.apache.catalina.servlets.DefaultServlet.doGet(DefaultServlet.java:519)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at 
> org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:679) 
> 
>     at 
> org.apache.catalina.core.ApplicationDispatcher.doInclude(ApplicationDispatcher.java:570) 
> 
>     at 
> org.apache.catalina.core.ApplicationDispatcher.include(ApplicationDispatcher.java:493) 
> 
>     at 
> org.apache.jasper.runtime.JspRuntimeLibrary.include(JspRuntimeLibrary.java:818) 
> 
>     at 
> org.apache.jasper.runtime.PageContextImpl.include(PageContextImpl.java:390)
>     at 
> org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTag.java:757) 
> 
>     at 
> org.apache.struts.taglib.tiles.InsertTag.doEndTag(InsertTag.java:369)
>     at org.apache.jsp.test$jsp._jspService(test$jsp.java:73)
>     at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
>     at 
> org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:202) 
> 
>     at 
> org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:382)
>     at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:474)
>     at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> [SNIP]
> 
> I'm using JBoss 2.4.4 with embedded Tomcat 4.0.1 and using the latest 
> (20020219) nightly build of struts and latest development build of tiles 
> which I downloaded from tiles homepage.
> I have defined the controller as TilesRequestProcessor in 
> struts-config.xml and in web.xml I have ActionComponentServlet as the 
> action component.
> 
> Thanks.
> Tuomo
> 
> 
> -- 
> To unsubscribe, e-mail:   
> <ma...@jakarta.apache.org>
> For additional commands, e-mail: 
> <ma...@jakarta.apache.org>
> 
> 




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>