Check if the JSP samples work.
If yes, then probably there's an error somewhere in your code that causes an
exception which is handled incorrectly in the recent Cocoon (according to
rumors in users list).

Also, you can use the JSPReader to get the pure output of your JSP and then
check Cocoon logs to see if there are any exceptions (except the Illegal
state one).

Konstantin

----- Original Message -----
From: Nesto
To: [EMAIL PROTECTED]
Sent: Tuesday, February 18, 2003 12:29
Subject: Is this a bug?


Hello!

I have a problem with a JSP generator, and after many attempts, now I think
that there could be a bug.
So I need your help!
I use Cocoon 2.0.4 with Tomcat 4.1.18, on a server that runs Linux RedHat 8.
Here I write my simple test code:

The jsp (named prova.jsp) generates a small xml data, and reads a request
parameter from the http request.

<%@ page contentType="text/xml"%><?xml version="1.0"?>
<document>
  <parametro><%=request.getParameter("name")%></parametro>
</document>

This simple jsp was included as generator in my sitemap:

<?xml version="1.0"?>
<map:sitemap xmlns:map="http://apache.org/cocoon/sitemap/1.0";>
<map:components>
   <map:generators default="file"/>
   <map:transformers default="xslt"/>
   <map:readers default="resource"/>
   <map:serializers default="html"/>
   <map:selectors default="browser"/>
   <map:matchers default="wildcard"/>
</map:components>
<map:pipelines>
   <map:pipeline>
     <map:match pattern="prova.jsp">
       <map:act type="request">
         <map:parameter name="parameters" value="true"/>
         <map:generate type="jsp" src="prova.jsp?name={name}"
mime-type="text/xml"/>
         <map:serialize type="xml"/>
       </map:act>
     </map:match>
   </map:pipeline>
</map:pipelines>
</map:sitemap>
<!-- end of file -->

I think there is nothing wrong in this sitemap!

But when I request http://myHost:8080/cocoon/myApp/prova.jsp?name=xyz
I get the exception:

HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it
from fulfilling this request.
exception
java.lang.IllegalStateException
 at
org.apache.coyote.tomcat4.CoyoteResponseFacade.reset(CoyoteResponseFacade.ja
va:251)
 at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1115)
 at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
 at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Application
FilterChain.java:247)
 at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterCh
ain.java:193)
 at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.ja
va:260)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.ja
va:191)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2415)
 at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.
java:170)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:172
)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:641)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java
:174)
 at
org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.invok
eNext(StandardPipeline.java:643)
 at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:480)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:432)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:386)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:534)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:530)
 at java.lang.Thread.run(Thread.java:536)

I hope I write all the informations you need!

Thank you!
Nesto


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to