tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Hans Hansen" <>
Subject SV: [OT] Servlet and JSP re-entrancy ?
Date Mon, 14 Nov 2005 15:12:31 GMT

You might want to make sure you that you do not make use of instance
variables in your do* sections.

I found this article very good:



-----Oprindelig meddelelse-----
Fra: Andriy Vasylyev [] 
Sendt: 14. november 2005 15:28
Til: Tag Libraries Users List
Emne: AW: [OT] Servlet and JSP re-entrancy ?

as far as I know the right answer is (b) but it is only regarding servlet
Only one instance of a servlet must be per each JVM (exception
The same is for JSP.


-----Urspr√ľngliche Nachricht-----
Von: Oded Arbel []
Gesendet: Montag, 14. November 2005 15:24
Betreff: [OT] Servlet and JSP re-entrancy ?


I have an off-topic question regarding the servlet API specs or rather, 
its implementation in Tomcat:
Suppose I have a servlet which serves requests on some path. When a 
request comes it, a servlet object is instantiated and called to handle 
the request. What happens now if another request for the same servlet 
path is being received before the servlet has returned from do*() ?
is (a) a new object is instantiated, (b) the same object is called in 
another thread or (c) the request is being held till the first (or a 
limited number of) object(s) is done ?

And what about JSP files - is it the same ?

The reason I'm asking this, is that we have a case where a JSP 
application is being called by multiple users, and it looks like some 
class members there get clobberred by concurrent calls. The application 
apparently was written on the concept that servlet/jsp api is not 
re-entrant, but I don't know if this is how it is and from a quick 
google I couldn't find out.


Oded Arbel
m-Wise mobile solutions

+972-9-9611212 (204)

Reasons to Run Away 5-"When the DM unloads 4 figure boxes of skeletons 
and says that he doesn't have enough figures. Then says each figure is 
10 skeletons."

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message