You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Dave Newton <ne...@yahoo.com> on 2008/06/01 15:29:55 UTC

Re: Are sessions confused?

--- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
> With ServletActionContext.getRequest().getSession().setAttribute("user",
> (int) (Math.random() * 100)); the problem is only in
> firefox!!.

If you're on different machines and seeing the wrong session data on them then something is broken with your application. I've never seen this in S2 and as said before most of us here are using S2 sessions without any issues.

Dave


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


Re: Are sessions confused?

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
You are welcome. Martin told me that.

Regards,

JP

2008/6/6, Julien ROTT <ju...@gmail.com>:
> this seems to work, the sessions aren't overlaping anymore.
> I'll test deeper on monday ;-)
> Thanks !
>
> 2008/6/6 Juan Pablo Pizarro <ju...@gmail.com>:
>
> > Hi Julien,
> >
> >  I had two problems, the first was my app, where the problem was
> > hibernate. The other, on my pc at home, the struts-blank, I don't know
> > (I abandoned that when I solved the problem of my app).
> >
> >  In my application, I put
> >
> >                response.setHeader("Cache-Control", "no-cache");
> >        response.setHeader("Pragma", "no-cache");
> >        response.setDateHeader("Expires", 0);
> >
> > http://www.jguru.com/faq/view.jsp?EID=377
> >
> > Regards,
> >
> > JP
> >
> >
> >
>

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


Re: Are sessions confused?

Posted by Julien ROTT <ju...@gmail.com>.
this seems to work, the sessions aren't overlaping anymore.
I'll test deeper on monday ;-)
Thanks !

2008/6/6 Juan Pablo Pizarro <ju...@gmail.com>:

> Hi Julien,
>
>  I had two problems, the first was my app, where the problem was
> hibernate. The other, on my pc at home, the struts-blank, I don't know
> (I abandoned that when I solved the problem of my app).
>
>  In my application, I put
>
>                response.setHeader("Cache-Control", "no-cache");
>        response.setHeader("Pragma", "no-cache");
>        response.setDateHeader("Expires", 0);
>
> http://www.jguru.com/faq/view.jsp?EID=377
>
> Regards,
>
> JP
>
>
>

Re: Are sessions confused?

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
Hi Julien,

  I had two problems, the first was my app, where the problem was
hibernate. The other, on my pc at home, the struts-blank, I don't know
(I abandoned that when I solved the problem of my app).

  In my application, I put

                response.setHeader("Cache-Control", "no-cache");
	response.setHeader("Pragma", "no-cache");
	response.setDateHeader("Expires", 0);

http://www.jguru.com/faq/view.jsp?EID=377

Regards,

JP


2008/6/6, Julien ROTT <ju...@gmail.com>:
> Hi Juan Pablo,
>
> did you find a solution to your problem ?
>
> I have the same: my application is on the internet, and the clients access
> to the application from behind a proxy. When client "A" logs in, and then a
> client "B" logs in, Client "B" sees the data which is stored in client "A"
> session.
>
> Is it possible to avoid this problem by forcing the urlRewriting with the
> jsessionid for each request ?
>
> jr.
>
>
> 2008/6/2 Juan Pablo Pizarro <ju...@gmail.com>:
>
> > No, I haven't. Now my application is working, then, i suspect that the
> > problem was external and maybe the networking personel had a proxy or
> > something like that. I'm asking them. In my pc, I haven't.
> >
> > I'll download tomcat again to test in my house.
> >
> >
> >
>

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


Re: Are sessions confused?

Posted by Julien ROTT <ju...@gmail.com>.
Hi Juan Pablo,

did you find a solution to your problem ?

I have the same: my application is on the internet, and the clients access
to the application from behind a proxy. When client "A" logs in, and then a
client "B" logs in, Client "B" sees the data which is stored in client "A"
session.

Is it possible to avoid this problem by forcing the urlRewriting with the
jsessionid for each request ?

jr.


2008/6/2 Juan Pablo Pizarro <ju...@gmail.com>:

> No, I haven't. Now my application is working, then, i suspect that the
> problem was external and maybe the networking personel had a proxy or
> something like that. I'm asking them. In my pc, I haven't.
>
> I'll download tomcat again to test in my house.
>
>
>

Re: Are sessions confused?

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
No, I haven't. Now my application is working, then, i suspect that the
problem was external and maybe the networking personel had a proxy or
something like that. I'm asking them. In my pc, I haven't.

I'll download tomcat again to test in my house.



2008/6/2 Al Sutton <al...@alsutton.com>:
> Do you have a caching proxy between you and the server? If so try going
> directly to the server.
>
> Juan Pablo Pizarro wrote:
>>
>> Yes, the effect is the same.. :( everything is ok, but when I pressed
>> ctrl+f5, the sessions are the last again.
>>
>> How you put thing in the session from a action?
>>
>> 2008/6/1, Martin <mg...@hotmail.com>:
>>
>>>
>>> can you display the session_id from your test scenarios?
>>>
>>> Thanks
>>> ----- Original Message ----- From: "Juan Pablo Pizarro"
>>> <ju...@gmail.com>
>>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>>> Sent: Sunday, June 01, 2008 11:30 AM
>>> Subject: Re: Are sessions confused?
>>>
>>>
>>>
>>>
>>>>
>>>> Yes I know, but my application was struts2-blank-2.0.11.1.war (from
>>>> struts-2.0.11.1-all.zip). Then I coded a bit and I posted that.
>>>>
>>>> JP
>>>>
>>>> 2008/6/1 Dave Newton <ne...@yahoo.com>:
>>>>
>>>>
>>>>>
>>>>> --- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
>>>>>
>>>>>
>>>>>>
>>>>>> With
>>>>>>
>>>
>>> ServletActionContext.getRequest().getSession().setAttribute("user",
>>>
>>>>>>
>>>>>> (int) (Math.random() * 100)); the problem is only in
>>>>>> firefox!!.
>>>>>>
>>>>>>
>>>>>
>>>>> If you're on different machines and seeing the wrong session data on
>>>>>
>>>
>>> them then something is broken with your application. I've never seen this
>>> in
>>> S2 and as said before most of us here are using S2 sessions without any
>>> issues.
>>>
>>>>>
>>>>> Dave
>>>>>
>>>>>
>>>>>
>>>>>
>>>
>>> ---------------------------------------------------------------------
>>>
>>>>>
>>>>> To unsubscribe, e-mail:
>>>>>
>>>
>>> user-unsubscribe@struts.apache.org
>>>
>>>>>
>>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>>
>>>>>
>>>>>
>>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>>
>>>>
>>>> To unsubscribe, e-mail:
>>>>
>>>
>>> user-unsubscribe@struts.apache.org
>>>
>>>>
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Are sessions confused?

Posted by Al Sutton <al...@alsutton.com>.
Do you have a caching proxy between you and the server? If so try going 
directly to the server.

Juan Pablo Pizarro wrote:
> Yes, the effect is the same.. :( everything is ok, but when I pressed
> ctrl+f5, the sessions are the last again.
>
> How you put thing in the session from a action?
>
> 2008/6/1, Martin <mg...@hotmail.com>:
>   
>> can you display the session_id from your test scenarios?
>>
>> Thanks
>> ----- Original Message ----- From: "Juan Pablo Pizarro"
>> <ju...@gmail.com>
>> To: "Struts Users Mailing List" <us...@struts.apache.org>
>> Sent: Sunday, June 01, 2008 11:30 AM
>> Subject: Re: Are sessions confused?
>>
>>
>>
>>     
>>> Yes I know, but my application was struts2-blank-2.0.11.1.war (from
>>> struts-2.0.11.1-all.zip). Then I coded a bit and I posted that.
>>>
>>> JP
>>>
>>> 2008/6/1 Dave Newton <ne...@yahoo.com>:
>>>
>>>       
>>>> --- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
>>>>
>>>>         
>>>>> With
>>>>>           
>> ServletActionContext.getRequest().getSession().setAttribute("user",
>>     
>>>>> (int) (Math.random() * 100)); the problem is only in
>>>>> firefox!!.
>>>>>
>>>>>           
>>>> If you're on different machines and seeing the wrong session data on
>>>>         
>> them then something is broken with your application. I've never seen this in
>> S2 and as said before most of us here are using S2 sessions without any
>> issues.
>>     
>>>> Dave
>>>>
>>>>
>>>>
>>>>         
>> ---------------------------------------------------------------------
>>     
>>>> To unsubscribe, e-mail:
>>>>         
>> user-unsubscribe@struts.apache.org
>>     
>>>> For additional commands, e-mail: user-help@struts.apache.org
>>>>
>>>>
>>>>
>>>>         
>>>       
>> ---------------------------------------------------------------------
>>     
>>> To unsubscribe, e-mail:
>>>       
>> user-unsubscribe@struts.apache.org
>>     
>>> For additional commands, e-mail: user-help@struts.apache.org
>>>
>>>
>>>
>>>       
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>     
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   


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


Re: Are sessions confused?

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
Yes, the effect is the same.. :( everything is ok, but when I pressed
ctrl+f5, the sessions are the last again.

How you put thing in the session from a action?

2008/6/1, Martin <mg...@hotmail.com>:
> can you display the session_id from your test scenarios?
>
> Thanks
> ----- Original Message ----- From: "Juan Pablo Pizarro"
> <ju...@gmail.com>
> To: "Struts Users Mailing List" <us...@struts.apache.org>
> Sent: Sunday, June 01, 2008 11:30 AM
> Subject: Re: Are sessions confused?
>
>
>
> > Yes I know, but my application was struts2-blank-2.0.11.1.war (from
> > struts-2.0.11.1-all.zip). Then I coded a bit and I posted that.
> >
> > JP
> >
> > 2008/6/1 Dave Newton <ne...@yahoo.com>:
> >
> > > --- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
> > >
> > > > With
> ServletActionContext.getRequest().getSession().setAttribute("user",
> > > > (int) (Math.random() * 100)); the problem is only in
> > > > firefox!!.
> > > >
> > >
> > > If you're on different machines and seeing the wrong session data on
> them then something is broken with your application. I've never seen this in
> S2 and as said before most of us here are using S2 sessions without any
> issues.
> > >
> > > Dave
> > >
> > >
> > >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > > For additional commands, e-mail: user-help@struts.apache.org
> > >
> > >
> > >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


Re: Are sessions confused?

Posted by Martin <mg...@hotmail.com>.
can you display the session_id from your test scenarios?

Thanks
----- Original Message ----- 
From: "Juan Pablo Pizarro" <ju...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Sent: Sunday, June 01, 2008 11:30 AM
Subject: Re: Are sessions confused?


> Yes I know, but my application was struts2-blank-2.0.11.1.war (from
> struts-2.0.11.1-all.zip). Then I coded a bit and I posted that.
>
> JP
>
> 2008/6/1 Dave Newton <ne...@yahoo.com>:
>> --- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
>>> With ServletActionContext.getRequest().getSession().setAttribute("user",
>>> (int) (Math.random() * 100)); the problem is only in
>>> firefox!!.
>>
>> If you're on different machines and seeing the wrong session data on them 
>> then something is broken with your application. I've never seen this in 
>> S2 and as said before most of us here are using S2 sessions without any 
>> issues.
>>
>> Dave
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
> 


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


Re: Are sessions confused?

Posted by Juan Pablo Pizarro <ju...@gmail.com>.
Yes I know, but my application was struts2-blank-2.0.11.1.war (from
struts-2.0.11.1-all.zip). Then I coded a bit and I posted that.

JP

2008/6/1 Dave Newton <ne...@yahoo.com>:
> --- On Fri, 5/30/08, Juan Pablo Pizarro wrote:
>> With ServletActionContext.getRequest().getSession().setAttribute("user",
>> (int) (Math.random() * 100)); the problem is only in
>> firefox!!.
>
> If you're on different machines and seeing the wrong session data on them then something is broken with your application. I've never seen this in S2 and as said before most of us here are using S2 sessions without any issues.
>
> Dave
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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