Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to get response in RequestDispatcher

 
ying lam
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic