I need the output in the cocoon pipelines. I am already using the jspReader but it gives me errors. Below is the sitemap that I am using to generate jsp pages. Is JSPReader another option of JTidy/JSPGenerator.
You still have the explanation of the two components in your sitemap:
JSPGenerator: JspGenerator is used to get result of a JSP page then output it as XML (SAX events)
JSPReader: JSPReader is used to serve direct output from a JSP page. Note, that JSP result can be non XML
This means the reader has no problem with reading non-XML as it does not have to create SAX events out of it. It just outputs the result to the client.
The JSPGenerator *does* generate SAX events of it, i.e. it parses the JSP output. But this will only work with well-formed XML output.
Since I have both the JSPGenerator and the JSPReader in the sitemap. Which one is used to display the output of the jsp page.
Sorry, but I don't understand what these 2 sentences should mean.
When I asked for the need of the JSP output in the pipelines I meant the SAX events. If it is enough for you to give the JSP output directly to the client, you do not need to parse it. Only if you need the SAX events, e.g. for manipulating them via a transformer, you need the tidying JSPGenerator.
You said you got errors with JSPReader? What's the error? It should work the same way like JSPGenerator (besides the parsing of course).
Here is the error I got
An Error Occurred
ServletException in JspGenerator.generate()
org.apache.cocoon.ProcessingException: ServletException in JspGenerator.generate()
cause: org.apache.cocoon.ProcessingException: ServletException in JspGenerator.generate()
stacktrace[hide]
org.apache.cocoon.ProcessingException: ServletException in JspGenerator.generate()
at org.apache.cocoon.generation.JspGenerator.generate(JspGenerator.java:124)
Unfortunately that's the shortened stacktrace that is not very helpful. This issue was fixed only some days ago: http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23269.
Is it possible for you to either update your Cocoon to latest CVS version or to modify your local code as in the diff at http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/jsp/java/org/apache/cocoon/reading/JSPReader.java?r1=1.8&r2=1.9&diff_format=h
It's just the getRootCause() that must be removed in JSPReader. You must rebuild Cocoon afterwards, but alltogether it should not take more than 5 minutes. You can make the same change in the JSPGenerator class as this one could fail with the same not helpful message:
http://cvs.apache.org/viewcvs.cgi/cocoon-2.1/src/blocks/jsp/java/org/apache/cocoon/generation/JSPGenerator.java?r1=1.1&r2=1.2&diff_format=h
Joerg
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]