Mantis - Resin
Viewing Issue Advanced Details
1740 crash always 05-17-07 19:39 06-05-07 14:51
johnhughbowen  
ferg  
normal  
closed 3.1.1  
fixed  
none    
none 3.1.2  
0001740: Include file causes IllegalStateException if included in second file
This has only been tested in Windows XP and Windows server 2003

If a JSP file includes a secon jsp file using the <jsp:include page directive, and then the same include file is again included in a second JSP file. The second one will fail with...

java.lang.IllegalStateException: sendError() forbidden after buffer has
been committed.
    at com.caucho.server.connection.AbstractHttpResponse.sendError(AbstractHttpResponse.java:460)
    at com.caucho.server.connection.AbstractHttpResponse.sendError(AbstractHttpResponse.java:447)
    at com.caucho.jsp.Page.pageservice(Page.java:562)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192)
    at com.caucho.server.webapp.DispatchFilterChain.doFilter(DispatchFilterChain.java:97)
    at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:159)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:240)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:490)
    at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:354)
    at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:971)
    at _jsp._one._simpleinclude__jsp._jspService(one/simpleinclude.jsp:6)
    at com.caucho.jsp.JavaPage.service(JavaPage.java:61)
    at com.caucho.jsp.Page.pageservice(Page.java:577)
    at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:192)
    at com.bluegum.jasmine.control.UTF8Filter.doFilter(UTF8Filter.java:14)
    at com.caucho.server.dispatch.FilterFilterChain.doFilter(FilterFilterChain.java:73)
    at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:125)
    at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:175)
    at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:240)
    at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
    at com.caucho.server.port.TcpConnection.run(TcpConnection.java:477)
    at com.caucho.util.ThreadPool$Item.runTasks(ThreadPool.java:600)
    at com.caucho.util.ThreadPool$Item.run(ThreadPool.java:522)
    at java.lang.Thread.run(Thread.java:595)

I have included files that allow you to reproduce the problem exactly. The files are simple, and the zip file should be extracted into the root directory to work.
Just run
http://www.panpac.com/one/simpleinclude.jsp [^]
followed by
http://www.panpac.com/two/simpleinclude.jsp [^]
 C:\\resin\\webapps\\panpac\\panpacific.com\\resin error.zip [^] (853 bytes) 05-17-07 19:39

Notes
(0001961)
johnhughbowen   
05-25-07 19:33   
Hey Guys, This is critical for Us. As far as I can see there is no work around, and it is causing the server to crash. MediaConcepts has 5 liciences through you (3 MediaConcepts+2 Ascott) and we will be buying more for our customers. Please can you at least take a look.
(0002012)
ferg   
06-05-07 14:51   
jsp/15le

This is a caching issue. It has an easy workaround by converting the static JSP to a dynamic one, e.g. by making it be:

<h1>Hello World</h1><% %>