File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Servlet Chaining help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlet Chaining help" Watch "Servlet Chaining help" New topic
Author

Servlet Chaining help

Sajee Joseph
Ranch Hand

Joined: Jan 17, 2001
Posts: 200
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?
Annie Smith
Ranch Hand

Joined: Mar 05, 2005
Posts: 172
AFAIK, the servlet is multithreaded unless you implement a SingleThreadModel. So, it should remain the same.


Cheers!<br /><b>Annie</b>
 
wood burning stoves
 
subject: Servlet Chaining help
 
Similar Threads
Problem with posting data from one servlet to another servlet in a different application
RequestDispatcher.forward to another servlet to handle form in doPost?
ServletA extend ServletB right or wrong ?
Generating requests from servlets
Mapping a main Action Servlet to other servlets