aspose file tools*
The moose likes Servlets and the fly likes How to get response in RequestDispatcher Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "How to get response in RequestDispatcher" Watch "How to get response in RequestDispatcher" New topic
Author

How to get response in RequestDispatcher

ying lam
Ranch Hand

Joined: May 17, 2004
Posts: 85
Hi,

In my doGet() of my servlet "Servlet0", i need to forward the request to another servlet.

So I did this:

But how can I get what is the response after Servlet1 handles it? Since i need to make modification in my Servlet0 before I finally response to the client (browser)

Thank you.
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

The answer is in the code you pasted.

The response gets passed to your servlet, you then pass it to the next servlet as an argument to the responseDispatcher.forward call.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to get response in RequestDispatcher