cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Nico Bekema" <Nico.Bek...@ctp.com>
Subject redirect-to with uri from action
Date Wed, 22 Jan 2003 22:05:06 GMT
Hi all,

I would like to use a redirect-to in the sitemap using a uri that
results from an action.
Unfortunately it results in an Exception. I hope somebody can help me.

The entry in the sitemap looks like this:

<map:match pattern="*">
    <map:act type="myAction">
        <map:parameter name="param" value="myValue"/>
    </map:act>
    <map:redirect-to session="false" uri="{value}"/>
</map:match>

The code in the action is as follows:

Context ctx = ObjectModelHelper.getContext(objectModel);
try {
    String sParam = params.getParameter("param");
    sValue = ctx.getInitParameter(sParam);
} catch (ParameterException e) {
   sValue = " ";
}
Map map = new HashMap();
map.put("value", sValue);
return map;

The exception is:
ERROR   (2003-01-22) 22:40.36:636   [access] (Unknown-URI)
Unknown-thread/CocoonServlet: Cocoon servlet threw an Exception while
trying to close stream.
java.io.IOException: The stream has been closed
	at
org.apache.catalina.connector.ResponseStream.flush(ResponseStream.java:237)
	at
org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:1166)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
	at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:247)
	at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:193)
	at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:243)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:190)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.CertificatesValve.invoke(CertificatesValve.java:246)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardContext.invoke(StandardContext.java:2347)
	at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:180)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:170)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:468)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:564)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:174)
	at
org.apache.catalina.core.StandardPipeline.invokeNext(StandardPipeline.java:566)
	at
org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:472)
	at
org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:943)
	at
org.apache.ajp.tomcat4.Ajp13Processor.process(Ajp13Processor.java:458)
	at
org.apache.ajp.tomcat4.Ajp13Processor.run(Ajp13Processor.java:551)
	at java.lang.Thread.run(Thread.java:536)

any help is appreciated,

thx,
Nico



---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail:   <cocoon-users-help@xml.apache.org>


Mime
View raw message