• 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

Servlet Chaining help

 
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello all,

I have a servlet (ServletA) invoking another servlet (ServletB) multiple times using RequestDispatcher.include(req,res) method. Actually the architecure is such like from ServletA's service method ServletB is invoked multiple times to achive a functionality. This is working as i am invoking ServletB sequentially one after the other. Now i want to multithread this.
Thus i have created a Thread class. But i have some doubts regarding this:
1. From my threaded class how do i invoke ServletB?
Will it work if i pass the RequestDispatcher from ServletA to the Threaded class. But in this case how do i send the Request & Response parameters to the include() method?

How do i go about this?
 
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
AFAIK, the servlet is multithreaded unless you implement a SingleThreadModel. So, it should remain the same.
 
reply
    Bookmark Topic Watch Topic
  • New Topic