Riyad,
Close, but it's more like this:
1 client (user) == 1 session.
In most cases your client (assuming it's a browser) would only send
one request, which would translate into one thread, and therefor you
wouldn't have a threading issue with your Session object. There is no
guarantee that
The subject is sort of a brain dump of what is going on, let me
explain what is happening:
Setup:
ControllerServlet loads page content from DB and stores it in the
session under a well known key, then it uses a requestDispatcher to
send control to the appropriate JSP to render the content. So it
Riyad,
You should not be using the Session object to store your DTO for
display. Especially if you are forwarding the request to a JSP. The
Session object should only be used to store data that is required to
remain in server memory between client requests. I would place your
DTO in the