You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Senthilrajan VS <rs...@freescale.com> on 2005/08/16 13:54:10 UTC

How JSESSIONID is passes

Hi all,

How Jsessionid is passed in the struts application and I don't have any control for that. how to avoid that. In my application I am facing the problem in the session it is creating the new session for every request. Is this problem related to Jsessionid?


Thanks & Regards,
SenthilRajan VS

Re: [OT] Re: How JSESSIONID is passes

Posted by GR...@intellicare.com.
I was thinking of that too.. He did say in his initail post: "I'm keep on 
calling this action for different
condition".. so the clue maybe hidden in that.. 

But then again, having been up since 3am, I perhaps shouldn't be posting 
to any lists..;)
Geeta


Dave Newton <ne...@pingsite.com> wrote on 08/16/2005 11:21:36 AM:

> >
> Which makes me wonder why the original poster was continually getting 
> new sessions; seems weird.
> 
> Dave

Re: [OT] Re: How JSESSIONID is passes

Posted by Dave Newton <ne...@pingsite.com>.
GRamani@intellicare.com wrote:

>You are quite right; I was being sloppy.. Should have added the "if 
>there's no current session" bit.. thanks for the catch..
>  
>
Which makes me wonder why the original poster was continually getting 
new sessions; seems weird.

Dave

>Dave Newton <ne...@pingsite.com> wrote on 08/16/2005 10:54:39 AM:
>  
>
>>GRamani@intellicare.com wrote:
>>    
>>
>>>HttpSession Session=request.getSession(true);
>>>
>>>The "true" means create a new session.
>>>      
>>>
>>For which J2EE versions is that correct? In my 1.3 JavaDocs it says:
>>
>>"Returns the current |HttpSession| associated with this request or, if 
>>if there is no current session and |create| is true, returns a new 
>>    
>>
>session."
>  
>


Re: [OT] Re: How JSESSIONID is passes

Posted by GR...@intellicare.com.
You are quite right; I was being sloppy.. Should have added the "if 
there's no current session" bit.. thanks for the catch..
Geeta

Dave Newton <ne...@pingsite.com> wrote on 08/16/2005 10:54:39 AM:

> GRamani@intellicare.com wrote:
> 
> >HttpSession Session=request.getSession(true);
> >
> >The "true" means create a new session.
> > 
> >
> For which J2EE versions is that correct? In my 1.3 JavaDocs it says:
> 
> "Returns the current |HttpSession| associated with this request or, if 
> if there is no current session and |create| is true, returns a new 
session."
> 
> Dave
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

> 
> CONFIDENTIALITY NOTICE:This email is intended solely for the person 
> or entity to which it is addressed and may contain confidential 
> and/or protected health information.  Any duplication, 
> dissemination, action taken in reliance upon, or other use of this 
> information by persons or entities other than the intended recipient
> is prohibited and may violate applicable laws.  If this email has 
> been received in error, please notify the sender and delete the 
> information from your system.  The views expressed in this email are
> those of the sender and may not necessarily represent the views of 
> IntelliCare.

[OT] Re: How JSESSIONID is passes

Posted by Dave Newton <ne...@pingsite.com>.
GRamani@intellicare.com wrote:

>HttpSession Session=request.getSession(true);
>
>The "true" means create a new session.
>  
>
For which J2EE versions is that correct? In my 1.3 JavaDocs it says:

"Returns the current |HttpSession| associated with this request or, if 
if there is no current session and |create| is true, returns a new session."

Dave


Re: How JSESSIONID is passes

Posted by GR...@intellicare.com.
Hi Senthilrajan:

As Hermod mentioned in his note, your session problems are caused because 
you have (from your previous note):
HttpSession Session=request.getSession(true);

The "true" means create a new session. So instead use:
HttpSession Session=request.getSession(false);

or just:
HttpSession Session=request.getSession();

and your problem will disappear.

Regards,
Geeta

"Senthilrajan VS" <rs...@freescale.com> wrote on 08/16/2005 07:54:10 AM:

> Hi all,
> 
> How Jsessionid is passed in the struts application and I don't have 
> any control for that. how to avoid that. In my application I am 
> facing the problem in the session it is creating the new session for
> every request. Is this problem related to Jsessionid?
> 
> 
> Thanks & Regards,
> SenthilRajan VS
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

> 
> CONFIDENTIALITY NOTICE:This email is intended solely for the person 
> or entity to which it is addressed and may contain confidential 
> and/or protected health information.  Any duplication, 
> dissemination, action taken in reliance upon, or other use of this 
> information by persons or entities other than the intended recipient
> is prohibited and may violate applicable laws.  If this email has 
> been received in error, please notify the sender and delete the 
> information from your system.  The views expressed in this email are
> those of the sender and may not necessarily represent the views of 
> IntelliCare.