forum

Home / DeveloperSection / Forums / How do servlets work in java?

How do servlets work in java?

Anonymous User 2257 07-Jul-2015
Suppose, I have a webserver which holds numerous Servlets. For information passing among those Servlets I am getting the Servlets context and setting session variables.

Now, if 2 or more users send request to this server then what happens to the session variables? Will they all be common for all the users or they will be different for each user. If they are different, then how was the server able to differentiate between different users?

One more similar question, if there are *n* users accessing a particular Servlets, then this Servlets gets instantiated only the first time the first user accessed it or does it get instantiated for all the users separately?

Updated on 07-Jul-2015
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By