cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Victor Batista" <>
Subject RE: Forward to another Servlet from Cocoon
Date Wed, 28 Sep 2005 10:30:46 GMT

   Thanks for your reply. Unfortunately I need to Forward the request, not
to redirect it.
   Can I somehow use the Container Dispatcher to  handle this?

   I tried the code below inside my Cocoon Action, but I got a Cocoon Error:

try {
    ServletContext context = (ServletContext)getContext();
    return null;
catch (IOException e1) {
    log.error("Error redirecting to HOME.ACTION!!");

   Any help would really be appreciated.
   Thanks in advance, 
          Victor Batista

-----Original Message-----
From: Geert Josten [] 
Sent: quarta-feira, 28 de Setembro de 2005 7:58
Subject: Re: Forward to another Servlet from Cocoon

Hi Victor,

I guess that you mean that you have defined multiple servlets in your
WEB-INF/web.xml file?

If a url is catched by the CocoonServlet and you want to fetch data from
another servlet or redirect 
to it, even within the same war, you will have to go through the http stack
again. In other words, 
you could use <map:redirect-to> as suggested by Upayavira, but you will have
to start the uri 
attribute with "http://"


>> Hello!
>>     I have a web application with a few servlets, one of which extends 
>> the CocoonServlet. In some cases, I need to forward from the 
>> CocoonServlet to a different servlet of my web application. How can I 
>> do this?
> Use:
> <map:redirect-to uri="......"/>
> To forward to a URI that is handled by your servlet instead.
> Regards, Upayavira
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

Drs. G.P.H. Josten

Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665  JZ  Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199

De informatie - verzonden in of met dit emailbericht - is afkomstig van
Daidalos BV en is 
uitsluitend bestemd voor de geadresseerde. Indien u dit bericht onbedoeld
hebt ontvangen, verzoeken 
wij u het te verwijderen. Aan dit bericht kunnen geen rechten worden

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message