• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Dispatching Request to multiple servlets

 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Use RequestDispatcher.include (request, response)
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I got it.

Thanks a lot
 
reply
    Bookmark Topic Watch Topic
  • New Topic