• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dispatching Request to multiple servlets

 
Sharika Raj
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi ,
I don't have any experience in servlets/JSP.I am reading HF book. I have a doubt about RequestDispatch. In Chapter 3 I did the example which forwards the request to a JSP Page.My doubt is how to dispatch if I want to to send same request to multiple servlets and collect their responses and finally send a single response back to client? Is it possible to dispatch to multiple servlets? Is there a way to get the control back once those servlets finish thier work?

Thanks,
Sharika
 
Anand Ko
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use RequestDispatcher.include (request, response)
 
Kumar J
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,
once you have dispatched...the only way to make use of the same request and response to further dispatch is to do it from this servlet/jsp to which you have dispatched...else you have to use include...

bye
kumar
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no way to do it concurrently, as said before use include or dispatch in a chain.
 
Sharika Raj
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now I got it.

Thanks a lot
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic