You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Ciaran Hanley <ci...@sentenial.ie> on 2004/03/09 01:48:01 UTC

Cookies And Session Problems

Hey,

 

I am writing an app but am having session problems. 

The last user to log into the system has their details available to all
other users logged in.

I haven't much of an idea about session control can anybody give some
pointers in the right direction?

 

>From reading I am thinking url rewriting is the way to go about it, but cant
find any good code snippets to get me started.

Also, if caching is disabled does this mean that cookies won't be stored on
the hard drive?

 

Thanks


RE: Cookies And Session Problems

Posted by Ciaran Hanley <ci...@sentenial.ie>.
Basically there is only one session being maintained for all users. So If
user "joe" logs in and is viewing client "a", and along comes a second user
"jack" who views client "b", on refreshing the page "joe" will have "jacks"
profile and will now see user "b" details as his details were the last
chosen and stored in the session.

I'm using the MVC pattern, apache web server but no application server. It's
being developed with Struts, Tomcat and MySQL database. Just cant find
anything to help me figure this out so far. Suggestions welcome
 
Thanks
Ciaran

-----Original Message-----
From: Max Cooper [mailto:max@maxcooper.com] 
Sent: 09 March 2004 02:19
To: Struts Users Mailing List
Subject: Re: Cookies And Session Problems

> The last user to log into the system has their details available to all
other users logged in.

Be really specific about you mean here, and give a few details about the
deployment environment.

- What session information appears to be "shared" by the users?
- Can you demonstrate the session problem in a simple example that does not
involve security in any way? One user hits page that puts something in
session, second user hits page that puts something in session, first user
can see second user's crap on a page that shows contents of the session.
Something like that.
- If not, are you using container-managed security (as defined in the
servlet spec) or something else?
- Is there a web server between the users and the app server?

-Max

----- Original Message ----- 
From: "Ciaran Hanley" <ci...@sentenial.ie>
To: "Struts User Mailing List" <st...@jakarta.apache.org>
Sent: Monday, March 08, 2004 4:48 PM
Subject: Cookies And Session Problems


Hey,



I am writing an app but am having session problems.

The last user to log into the system has their details available to all
other users logged in.

I haven't much of an idea about session control can anybody give some
pointers in the right direction?



>>From reading I am thinking url rewriting is the way to go about it, but
cant
find any good code snippets to get me started.

Also, if caching is disabled does this mean that cookies won't be stored on
the hard drive?



Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: Cookies And Session Problems

Posted by Max Cooper <ma...@maxcooper.com>.
> The last user to log into the system has their details available to all
other users logged in.

Be really specific about you mean here, and give a few details about the
deployment environment.

- What session information appears to be "shared" by the users?
- Can you demonstrate the session problem in a simple example that does not
involve security in any way? One user hits page that puts something in
session, second user hits page that puts something in session, first user
can see second user's crap on a page that shows contents of the session.
Something like that.
- If not, are you using container-managed security (as defined in the
servlet spec) or something else?
- Is there a web server between the users and the app server?

-Max

----- Original Message ----- 
From: "Ciaran Hanley" <ci...@sentenial.ie>
To: "Struts User Mailing List" <st...@jakarta.apache.org>
Sent: Monday, March 08, 2004 4:48 PM
Subject: Cookies And Session Problems


Hey,



I am writing an app but am having session problems.

The last user to log into the system has their details available to all
other users logged in.

I haven't much of an idea about session control can anybody give some
pointers in the right direction?



>From reading I am thinking url rewriting is the way to go about it, but cant
find any good code snippets to get me started.

Also, if caching is disabled does this mean that cookies won't be stored on
the hard drive?



Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Cookies And Session Problems

Posted by Ciaran Hanley <ci...@sentenial.ie>.
If you mean in the action mappings then no, I have the scope set to request
for each mapping.

Ciaran


-----Original Message-----
From: David Friedman [mailto:humble@ix.netcom.com] 
Sent: 09 March 2004 03:26
To: Struts Users Mailing List
Subject: RE: Cookies And Session Problems

Did you accidentally set the scope of the FormBean for your Action to
"application" instead of "session" or "request"?

Regards,
David

-----Original Message-----
From: Ciaran Hanley [mailto:ciaran.hanley@sentenial.ie]
Sent: Monday, March 08, 2004 7:48 PM
To: Struts User Mailing List
Subject: Cookies And Session Problems


Hey,



I am writing an app but am having session problems.

The last user to log into the system has their details available to all
other users logged in.

I haven't much of an idea about session control can anybody give some
pointers in the right direction?



>>From reading I am thinking url rewriting is the way to go about it, but
cant
find any good code snippets to get me started.

Also, if caching is disabled does this mean that cookies won't be stored on
the hard drive?



Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: Cookies And Session Problems

Posted by David Friedman <hu...@ix.netcom.com>.
Did you accidentally set the scope of the FormBean for your Action to
"application" instead of "session" or "request"?

Regards,
David

-----Original Message-----
From: Ciaran Hanley [mailto:ciaran.hanley@sentenial.ie]
Sent: Monday, March 08, 2004 7:48 PM
To: Struts User Mailing List
Subject: Cookies And Session Problems


Hey,



I am writing an app but am having session problems.

The last user to log into the system has their details available to all
other users logged in.

I haven't much of an idea about session control can anybody give some
pointers in the right direction?



>From reading I am thinking url rewriting is the way to go about it, but cant
find any good code snippets to get me started.

Also, if caching is disabled does this mean that cookies won't be stored on
the hard drive?



Thanks



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org