You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Gaël Oberson <go...@swissonline.ch> on 2001/04/04 18:33:48 UTC

Servlet Chaining...


Hello

I try to use Servlet Chaining with Tomcat.
Can I do that with a tag in the web.xml file (with <servlet-mapping> for
example), or must I modify my Request parameters?? does anyone know how to
do that???

I have a Servlet that generates an complete and valid XML file from a
database, and this file must be processed by the Cocoon servlet and then be
returned to the client. That's it. Can anyone help me please???

Thanks.





***********************************************
  Gaël Oberson
  Computer scientist
  Student in Computer Science Engineering (HES)

  Switzerland
  goberson@swissonline.ch
  i00gober@eif.ch
***********************************************


RE: Servlet Chaining...

Posted by Gael Oberson <go...@swissonline.ch>.
No, it doesn't work, because the HttpServletRequest class used in
HttpServlet doesn't implement the getRequestDispatcher method...

But it we can make your idea work, I don't understand how my XML file is
sent to the cocoon servlet... My XML file is printed do the response
(out.print(String);), and with the forward() method, the XML data is not
sent.. How does it work??



-----Message d'origine-----
De : Scott Walter [mailto:tx_scottwalter@yahoo.com]
Envoye : mercredi, 4. avril 2001 19:33
A : tomcat-user@jakarta.apache.org
Objet : Re: Servlet Chaining...


Could you use a request dispatcher to forward the
request to the second servlet?

>>From the first servlet's request object you could code
this:

RequestDispatcher rd = req.getRequestDispatcher("path
to second servlet");

rd.forward();


--- Gakl_Oberson <go...@swissonline.ch> wrote:
>
>
> Hello
>
> I try to use Servlet Chaining with Tomcat.
> Can I do that with a tag in the web.xml file (with
> <servlet-mapping> for
> example), or must I modify my Request parameters??
> does anyone know how to
> do that???
>
> I have a Servlet that generates an complete and
> valid XML file from a
> database, and this file must be processed by the
> Cocoon servlet and then be
> returned to the client. That's it. Can anyone help
> me please???
>
> Thanks.
>
>
>
>
>
> ***********************************************
>   Gakl Oberson
>   Computer scientist
>   Student in Computer Science Engineering (HES)
>
>   Switzerland
>   goberson@swissonline.ch
>   i00gober@eif.ch
> ***********************************************
>


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scott

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail.
http://personal.mail.yahoo.com/


Re: Servlet Chaining...

Posted by Scott Walter <tx...@yahoo.com>.
Could you use a request dispatcher to forward the
request to the second servlet?

>From the first servlet's request object you could code
this:

RequestDispatcher rd = req.getRequestDispatcher("path
to second servlet");

rd.forward();


--- Ga�l_Oberson <go...@swissonline.ch> wrote:
> 
> 
> Hello
> 
> I try to use Servlet Chaining with Tomcat.
> Can I do that with a tag in the web.xml file (with
> <servlet-mapping> for
> example), or must I modify my Request parameters??
> does anyone know how to
> do that???
> 
> I have a Servlet that generates an complete and
> valid XML file from a
> database, and this file must be processed by the
> Cocoon servlet and then be
> returned to the client. That's it. Can anyone help
> me please???
> 
> Thanks.
> 
> 
> 
> 
> 
> ***********************************************
>   Ga�l Oberson
>   Computer scientist
>   Student in Computer Science Engineering (HES)
> 
>   Switzerland
>   goberson@swissonline.ch
>   i00gober@eif.ch
> ***********************************************
> 


=====
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Scott

__________________________________________________
Do You Yahoo!?
Get email at your own domain with Yahoo! Mail. 
http://personal.mail.yahoo.com/