cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory J. Grubbs" <>
Subject uri-include calling servlet: problems
Date Fri, 06 Oct 2000 02:24:49 GMT
Robin's explanations have been most helpful.  I now have one of my servlets being called from
an XSP page and returning a reasonable result.  The
solution seems very elegant and flexible to me.

There are however two things which bother me about the solution:

1) To pass the data from my HTML form using the method suggested in the FAQ, I must alter
the method from POST to GET, then use code like the
       <xsp:expr>"http://localhost/servlet/myServlet?" + request.getQueryString()</xsp:expr>

Is there any way to continue using the POST method from forms, avoiding the encoded URL being
shown in the browser when the result returns?

2) I want my middleware servlet to return a complete XML response, including a specification
of the stylesheet to apply.  But if the servlet
returns the <?xml-stylesheet ... > PI, that PI will include inside the <page>
tag... and thus confuse Cocoon, which throws the trace:

org.apache.cocoon.processor.ProcessorException: Could not associate stylesheet to document:
 no matching stylesheet for: explorer
 at org.apache.cocoon.processor.xslt.XSLTProcessor.getResource(, Compiled
 at org.apache.cocoon.processor.xslt.XSLTProcessor.process(
 at org.apache.cocoon.Engine.handle(, Compiled Code)
 at org.apache.cocoon.Cocoon.service(
 at javax.servlet.http.HttpServlet.service(
 at org.apache.tomcat.core.ServletWrapper.handleRequest(, Compiled Code)
 at org.apache.tomcat.core.ContextManager.service(
 at org.apache.tomcat.service.connector.Ajp12ConnectionHandler.processConnection(,
Compiled Code)
 at, Compiled Code)
 at, Compiled Code)

Is there any clever way of applying a stylesheet specified by the servlet's return value?

View raw message