Hi,
Just want to clear up some confusion on
servlets and threads.
Lets say I have a base class called:
public class myBaseServlet extends HttpServlet {
HashMap req_params;
...
}
and then a class:
public class myNiftyServlet extends myBaseServlet{
...
}
I understand (I think), that myNiftyServlet only gets instantiated once, and multiple requests to it will be processed by multiple threads calling the service method, which then calls the doXXX methods.
So in the above example, the req_params would be shared by all threads, and needs to have synchronized access? Or, if I want a unique copy for each
thread, it should be declared in the doXXX method?
Any clarification from the enlighted would be appreciated.
Thanks,
Tom