Re: ideal method to set the sessionid in struts?

2002-05-01 Thread jfc100

Galbreath, Mark wrote:

>Right, I just wanted to give him the options, since it appears he doesn't
>understand session persistence mechanisms.
>
>Mark
>
>-Original Message-
>From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 8:06 AM
>To: Struts Users Mailing List
>Subject: RE: ideal method to set the sessionid in struts?
>
>
>Exactly my point... :)
>
>V
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 5:29 PM
>To: 'Struts Users Mailing List'
>Subject: RE: ideal method to set the sessionid in struts?
>
>
>Oops, sorry...finger slipped off the "'" key and hit return.
>
>No, it won't if the method parameter is getSession( false);  
>With getSession() or getSession( true), an existing session
>will be returned IF IT EXISTS, else a new session for the
>request will be created.
>
>Mark
>
>-----Original Message-----
>From: Galbreath, Mark 
>Sent: Wednesday, May 01, 2002 7:55 AM
>To: 'Struts Users Mailing List'
>Subject: RE: ideal method to set the sessionid in struts?
>
>
>No it won't.
>
>-----Original Message-
>From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 7:52 AM
>To: Struts Users Mailing List
>Subject: RE: ideal method to set the sessionid in struts?
>
>
>It will create and return a session if none exists. If session exists it
>will return that.
>
>V
>
>-Original Message-
>From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 5:20 PM
>To: 'Struts Users Mailing List'
>Subject: RE: ideal method to set the sessionid in struts?
>
>
>No.
>
>-Original Message-
>From: jfc100 [mailto:[EMAIL PROTECTED]]
>Sent: Wednesday, May 01, 2002 6:43 AM
>
>I think I can assume that calling 'request.getSession()' 
>explicitly will always return an existing session.
>
>Is that correct?
>
>Joe
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>
>--
>To unsubscribe, e-mail:
><mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail:
><mailto:[EMAIL PROTECTED]>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
ok, well somewhere a session is being created without me having to 
explicitly create one - perhaps in the struts controller.

This is why I say that my call to getSession() in MyAction will only 
return an existing session.

Joe



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Right, I just wanted to give him the options, since it appears he doesn't
understand session persistence mechanisms.

Mark

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 8:06 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


Exactly my point... :)

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


Oops, sorry...finger slipped off the "'" key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01

Exactly my point... :)

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:29 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


Oops, sorry...finger slipped off the "'" key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01



getSession
public HttpSession getSession()
Returns the current session associated with this request, or if the request does not 
have a session, creates one.



V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:25 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Oops, sorry...finger slipped off the "'" key and hit return.

No, it won't if the method parameter is getSession( false);  
With getSession() or getSession( true), an existing session
will be returned IF IT EXISTS, else a new session for the
request will be created.

Mark

-Original Message-
From: Galbreath, Mark 
Sent: Wednesday, May 01, 2002 7:55 AM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

No it won't.

-Original Message-
From: Vikram Goyal01 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 7:52 AM
To: Struts Users Mailing List
Subject: RE: ideal method to set the sessionid in struts?


It will create and return a session if none exists. If session exists it
will return that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Vikram Goyal01

It will create and return a session if none exists. If session exists it will return 
that.

V

-Original Message-
From: Galbreath, Mark [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 5:20 PM
To: 'Struts Users Mailing List'
Subject: RE: ideal method to set the sessionid in struts?


No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

Great rhetorical answer!  You guys are learning ;-)

Mark

-Original Message-
From: James Mitchell
Sent: Wednesday, May 01, 2002 6:43 AM

What exactly is your question?

Errwell did you answer your own question?

If I am understanding what you are saying:



If struts appends the sessionid in case the client doesn't accept cookies,
why wasn't I prompted about cookies that were never set?


Am I way off here?

JM

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ideal method to set the sessionid in struts?

2002-05-01 Thread Galbreath, Mark

No.

-Original Message-
From: jfc100 [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, May 01, 2002 6:43 AM

I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




Re: ideal method to set the sessionid in struts?

2002-05-01 Thread jfc100

James Mitchell wrote:

>What exactly is your question?
>
>Errwell did you answer your own question?
>
>If I am understanding what you are saying:
>
>
>
>If struts appends the sessionid in case the client doesn't accept cookies,
>why wasn't I prompted about cookies that were never set?
>
>
>Am I way off here?
>
>JM
>
>>-Original Message-
>>From: jfc100 [mailto:[EMAIL PROTECTED]]
>>Sent: Tuesday, April 30, 2002 12:58 PM
>>To: Struts Users Mailing List
>>Subject: Re: ideal method to set the sessionid in struts?
>>
>>
>>Tero P Paananen wrote:
>>
>>>>What is happening here?
>>>>
>>>Your app server sets the session id cookie.
>>>
>>> -TPP
>>>
>>>--
>>>To unsubscribe, e-mail:
>>>
>><mailto:[EMAIL PROTECTED]>
>>
>>>For additional commands, e-mail:
>>>
>><mailto:[EMAIL PROTECTED]>
>>
>>>
>>So does this mean that I never have to set cookies?
>>
>>(I'm using jboss.)
>>
>>
>>
>>--
>>To unsubscribe, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>For additional commands, e-mail:
>><mailto:[EMAIL PROTECTED]>
>>
>>
>
>
>--
>To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>
It looks as though the container automatically performs the basic level 
of session tracking and the 2.3 Servlet spec suggests this too. i.e.

> SRV.7.1.1 Cookies

> Session tracking through HTTP cookies is the most used session 
> tracking mechanism and is required to be supported by all servlet 
> containers. The container sends a cookie to the client. The client 
> will then return the cookie on each subsequent request to the server, 
> unambiguously associating the request with a session. The name of the 
> session tracking cookie must be JSESSIONID.


... and ...

> SRV.7.1.3 URL Rewriting

> URL rewriting is the lowest common denominator of session tracking. 
> When a client will not accept a cookie, URL rewriting may be used by 
> the server as the basis for session tracking. URL rewriting involves 
> adding data, a session id, to the URL path that is interpreted by the 
> container to associate the request with a session. The session id must 
> be encoded as a path parameter in the URL string. The name of the 
> parameter must be jsessionid. Here is an example of a URL containing 
> encoded path information: 
> http://www.myserver.com/catalog/index.html;jsessionid=1234 SRV.7.1.4 
> Session Integrity Web containers must be able to support the HTTP 
> session while servicing HTTP requests from clients that do not support 
> the use of cookies. To fulfil this requirement, web containers 
> commonly support the URL rewriting mechanism.


So if this is supported in tomcat/catalina(and hell, it is the reference 
imp!) then I think I can assume that calling 'request.getSession()' 
explicitly will always return an existing session.

Is that correct?

Joe


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




RE: ideal method to set the sessionid in struts?

2002-04-30 Thread James Mitchell

What exactly is your question?

Errwell did you answer your own question?

If I am understanding what you are saying:



If struts appends the sessionid in case the client doesn't accept cookies,
why wasn't I prompted about cookies that were never set?


Am I way off here?

JM

> -Original Message-
> From: jfc100 [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, April 30, 2002 12:58 PM
> To: Struts Users Mailing List
> Subject: Re: ideal method to set the sessionid in struts?
>
>
> Tero P Paananen wrote:
>
> >>What is happening here?
> >>
> >
> >Your app server sets the session id cookie.
> >
> > -TPP
> >
> >--
> >To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> So does this mean that I never have to set cookies?
>
> (I'm using jboss.)
>
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>




Re: ideal method to set the sessionid in struts?

2002-04-30 Thread jfc100

Tero P Paananen wrote:

>>What is happening here?
>>
>
>Your app server sets the session id cookie.
>
>   -TPP
>
>--
>To unsubscribe, e-mail:   
>For additional commands, e-mail: 
>
>
So does this mean that I never have to set cookies?

(I'm using jboss.)



--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




RE: ideal method to set the sessionid in struts?

2002-04-30 Thread Tero P Paananen

> What is happening here?

Your app server sets the session id cookie.

-TPP

--
To unsubscribe, e-mail:   
For additional commands, e-mail: 




ideal method to set the sessionid in struts?

2002-04-30 Thread jfc100

Hi,

I have noticed that without me having to store the sessionid in a cookie 
in the response, my browser contains a JSESSION cookie. I also have 
mozilla set to 'ask before setting any cookies' and I wasn't asked.

What is happening here?

Thanks
Joe


--
To unsubscribe, e-mail:   
For additional commands, e-mail: