You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by qa...@btinternet.com on 2001/02/16 12:20:10 UTC
tomcat on FreeBSD4.2
>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
>
>
>