tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From qazwa...@btinternet.com
Subject tomcat on FreeBSD4.2
Date Fri, 16 Feb 2001 11:20:10 GMT
>Hi,
>    I'm having troubles to understand how really 
sessions are working.
>    I'm using a servlet to handle every client requests 
and I'm using
>jsp
>    & session to display & various objects between 
frames, such as:
>
>    HttpSession session = req.getSession(false);
>    Toto toto = session.getAttribute("toto");
>    if (toto.getName() == "mike")
>        toto.setInfotoDisplay("Hi mike, waza?");
>    else if (toto.getName() == "alain")
>        toto.setInfotoDisplay("Tcho alain, ca boom?");
>    ...
>    session.setAttribute("toto", toto);
>
>    My concern is that I really thought that the object I
>    get with "getAttribute" on sessions were attached
>    to the according user.
>    But apparently not, it looks like my object Toto is 
shared
>    amongst my clients and thus everything is f**** 
up ;-(
>
>    Any idea how I could stick a session per user?
>
>thanx,
>
>--mike
>
>
>--------------------------------------------------------------
-------
>To unsubscribe, e-mail: tomcat-user-
unsubscribe@jakarta.apache.org
>For additional commands, email: tomcat-user-
help@jakarta.apache.org
>
>
>

Mime
View raw message