Please clarify a few points concerning Java Servlets

Posted by EugeneP on Stack Overflow See other posts from Stack Overflow or by EugeneP
Published on 2010-05-07T16:25:06Z Indexed on 2010/05/07 16:28 UTC
Read the original article Hit count: 195

Filed under:
|
|

suppose, I use Tomcat as a web container.

Is it true that once all the servlets found in a web-app/WEBAPPNAME

are init(IALIZED) then every change of a Servlet's property will be seen to every session.

So session 1 changes a property userName of a Servlet1 from "user1" to "user2"

session 1 is closed.

session 2 starts. It will see "user2" as the only value of Servlet1.userName property??

Any change of a Servlet's field will be seen to all subsequent sessions?

Are servlets singletons, aren't they?

© Stack Overflow or respective owner

Related posts about java

Related posts about servlets