Hi!
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();
context.getRequestDispatcher("/xpto").forward((ServletRequest)request,
(ServletResponse)response);
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 [mailto:[EMAIL PROTECTED]
Sent: quarta-feira, 28 de Setembro de 2005 7:58
To: [email protected]
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://"
HTH,
Geert
>> 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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
--
Drs. G.P.H. Josten
Consultant
Daidalos BV
Source of Innovation
Hoekeindsehof 1-4
2665 JZ Bleiswijk
Tel: +31 (0) 10 850 1200
Fax: +31 (0) 10 850 1199
www.daidalos.nl
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
ontleend.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]