Andrea Lardicci wrote:
>
> Hi all,
> I have servlet1 making authentication and servlet2 doing the job.
> Servlet1 create the session and store if exist the client id code and the
> language used by him in  the session and send back a menu page calling
> servlet2.
> Servlet2 can be used from clients that don't need any authentication.
> Servlet2 retrieves the session and the client id code if present.
> Sometimes happens that the id code of 2 clients are mixed - I realized it
> from the templates language they used.
> For example:
> Client1 logs in Servlet1 as 2222 using German
> Client2 logs in Servlet1 as 1111 using English
> Servlet2 should use German templates answering to 2222 and English one to
> 1111 checking the value of language in the session.
> Sometimes I found out from the logs that Servlet2 is using German templates
> for 1111 instead of English ones.
> I use session=request.getSession(true) in both servlets at the beginning of
> the doPost() method.

How are you testing this? If you're logging in from the same machine for both
clients, then they will have the same session.

You're finding out from the logs? What is the browser showing? If the browser is
displaying the correct language, then maybe the log is incorrect.

Are you sure you're using a different session object for both clients? Is
session an instance variable or a local variable. Maybe you're getting a thread
contention problem because session is an instance variable.

If none of these suggestions are correct, try cutting your servlet down to the
smallet amount of code that recreates the problem, and then post the code here.

K Mukhar

___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".

Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html

Reply via email to