tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rob Parker" <rob...@webcybernetics.com>
Subject Re: REPOST: Multi-Threaded JSP??
Date Wed, 10 May 2000 02:05:54 GMT
I'm a little puzzled by your request - but I'll try to put forward some points...

In general JSP's/Servlets provide small concise services, eg display content x, handle form
y. Hence in most cases
you don't need to handle the request using multiple threads. However within each JSP/servlet,
the code needs to be thread
safe because the page may need to handle concurrent requests. There is an architectural pattern
based on the Model View Controller
pattern which basically uses JSP's for the view and servlets for the controller. Hence since
the JSP is only responsible for the
view, it rarely needs some multithreaded processing pipeline.

On the other hand, if you were writing a chat server using a servlet, then you would probably
want to use a multithreaded
processing pipeline, eg, a background thread to dispatch incoming messages etc.

Thus I'd recommend looking at Sun's java website for more info on JSP's and the MVC architecture
and www.servlets.com
for more info on backgound threads in servlets.

regards

Rob
  ----- Original Message ----- 
  From: Luis Andrei Cobo 
  To: tomcat-user@jakarta.apache.org 
  Sent: Wednesday, May 10, 2000 11:31 AM
  Subject: REPOST: Multi-Threaded JSP??


  Does anyone know any examples of the feasibility of using Threads on JSP pages or in Servlets?
Im trying to do something with these pages Im building which require a large amount of processing
that would be very efficient of broken down into Threads on a variety of levels. Has anyone
used java.lang.Thread in thier JSP? gotten it to work?

  If so, examples would be helpful. Im assuming for now that its not a high demand topic since
it probably involves hand coding some of the _JSPservice directly, perhaps in order to implement
the runnable interface or something.
   

  Also, by extension, if it IS possible, can RMI and Applet Servlet communication be managed
with a Thread?

  Documentation anywhere on this?

  Luis Andrei Cobo
  Web Developer

  Sorry about the post yesterday...i was writing a draft and accidentally sent it.

Mime
View raw message