RE : encodeURL / jsessionid

2004-02-26 Thread PREVOSTO, Laurent


> De : Mike Curwen [mailto:[EMAIL PROTECTED] 
> Envoyé : jeudi 26 février 2004 00:25
> À : 'Tomcat Users List'; [EMAIL PROTECTED]
> Objet : RE: encodeURL / jsessionid
> 
> 
> No, sessions are not 'server' wide, they are scoped only to a 
> single user, of a single application.  I was looking up in 
> 'cross context' and 'single-sign-on' in the tomcat docs 
> (config docs for Context and Host, respectively), but they 
> don't appear to mention sharing a session.  Only the ability 
> to dispatch between apps, or to be challenged only once for Auth. 
>  
> Anyone else have ideas ?  ( I think Session sharing is, 
> strictly speaking, against spec).

Yup, it used to be in the spec and implemented in j2ee container.
But it's now gone since considered to be "bad design".
You have no direct solution to share sessions between webapps.
You can only share data through an external DataSource both webapp are able
to read/write to (file, db, ejb, etc.) 
Or you consider this is the same application and you merge sources to build
a unique webapp...

Of course if your only concern is about sharing login validation, any sso
framework will do the job, tomcat provides one.

Regards

Laurent

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



Re: RE : encodeURL / jsessionid

2004-02-26 Thread Jerald Powel

Hi,

Thanks for that. can you tell me then the purpose of jessionid - (methods 
encodeURL and getRequestedSessionId)? It seems a bit strange to pass the session 
around while in the session. 

 The purpose of the original post was due to a problem persisting an object across 
contexts. Unfortunately for me it was 'larger' than a String and could not be appended 
to the URL string (unless I manually pulled all fields from the object and passed them 
on the query string). Shiver.  Does any one have a solution to persisting complex 
objects across contexts? 

many thanks

G.

 

 

Yup, it used to be in the spec and implemented in j2ee container.
But it's now gone since considered to be "bad design".
You have no direct solution to share sessions between webapps.
You can only share data through an external DataSource both webapp are 
able
to read/write to (file, db, ejb, etc.) 
Or you consider this is the same application and you merge sources to 
build
a unique webapp...

Of course if your only concern is about sharing login validation, any 
sso
framework will do the job, tomcat provides one.

Regards

Laurent



-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download 
Messenger Now

Re: RE : encodeURL / jsessionid

2004-02-26 Thread Philipp Taprogge
Hi!

Jerald Powel wrote:
Thanks for that. can you tell me then the purpose of jessionid - (methods encodeURL and getRequestedSessionId)?
It seems a bit strange to pass the session around while in the session. 
As far as I understand, the only purpose of jsessionid and the above 
methods is to allow clients to keep track of their session id when 
they are not able to use cookies for one reason or another.
Normally, tomcat will set a cookie on login containing the sessionid. 
That cookie is then presented by the client for each subsequent 
request for a resource in the given context. If this does not work 
(for example when the client does not allow cookies to be set or 
simply does not implement cookies), URL rewriting can be used as an 
alternative. The client then will append ?jsessionid=whatnot to the 
URL and tomcat will then recognise the sessionid and remove that 
parameter before passing on the the webapp.
encodeURL() will decide wether the client can use cookies at runtime 
and of not append the jsessionid parameter. So, if you want your 
clients to have that option, you have to use that method.

As to getRequestedSessonId(), I could only guess why the specs opted 
to expose the id to the webapp... there might be valid reasons, but it 
certainly does not hurt.

HTH

Phil

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


RE: encodeURL / jsessionid

2004-02-25 Thread Mike Curwen
No, sessions are not 'server' wide, they are scoped only to a single
user, of a single application.  I was looking up in 'cross context' and
'single-sign-on' in the tomcat docs (config docs for Context and Host,
respectively), but they don't appear to mention sharing a session.  Only
the ability to dispatch between apps, or to be challenged only once for
Auth. 
 
Anyone else have ideas ?  ( I think Session sharing is, strictly
speaking, against spec).
 





> -Original Message-
> From: Jerald Powel [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 25, 2004 4:43 PM
> To: Tomcat Users List
> Subject: RE: encodeURL / jsessionid
> 
> 
> 
> Hi,
> 
> app1 and app2 are two applications under a single 
> instance of TC, with different contexts (defined in the server.xml). 
> 
> http://localhost:8080/app1
> 
> http://localhost:8080/app2
> 
> I wish to persist data when linking across the two. I was 
> under the impression that by using encodeURL or 
> getRequestedSessionId(), and acquiring the session ID,  I 
> could accomplish this? Please instruct me otherwise. 
> 
> regards  
> 
> G.  
> 
> when you say 'app1' and 'app2', what do you mean?
> Sessions are not shared between two different web-apps.
> 
> 
> > -Original Message-----
> > From: Jerald Powel [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, February 25, 2004 3:46 AM
> > To: Tomcat Users List
> > Subject: Re: encodeURL / jsessionid
> > 
> > 
> > That was my first move, but it was null
> > 
> > G.
> > 
> > 
> > Antonio_Fiol_Bonnín wrote:
> > 
> > 
> > 
> > 
> > 
> > 
> > Jerald Powel wrote:
> > 
> > >Hi,
> > >
> > > I wish to maintain state across contexts and have in app1:
> > >
> > >
> > >
> > >">app2
> > >
> > >when app2 is loaded the jsessionid is visible in the address bar:
> > >
> > >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
> E8C75A2E75
> >CBAC0534
> >
> >Now what do I do with it? How do I access data set on the session on
> >the previous context?
> >
> >Thanks a lot
> >
> >G.
> 
> 
> 
>   
> -
>   Yahoo! Messenger - Communicate instantly..."Ping" your 
> friends today! Download Messenger Now
> 


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



RE: encodeURL / jsessionid

2004-02-25 Thread Jerald Powel

Hi,

app1 and app2 are two applications under a single instance of TC, with different 
contexts (defined in the server.xml). 

http://localhost:8080/app1

http://localhost:8080/app2

I wish to persist data when linking across the two. I was under the impression that by 
using encodeURL or getRequestedSessionId(), and acquiring the session ID,  I could 
accomplish this? Please instruct me otherwise. 

regards  

G.  

when you say 'app1' and 'app2', what do you mean?
Sessions are not shared between two different web-apps.


> -Original Message-
> From: Jerald Powel [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 25, 2004 3:46 AM
> To: Tomcat Users List
> Subject: Re: encodeURL / jsessionid
> 
> 
> That was my first move, but it was null
> 
> G.
> 
> 
> Antonio_Fiol_Bonnín wrote:
> 
> 
> 
> 
> 
> 
> Jerald Powel wrote:
> 
> >Hi,
> >
> > I wish to maintain state across contexts and have in app1:
> >
> >
> >
> >">app2
> >
> >when app2 is loaded the jsessionid is visible in the address bar:
> >
> >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
E8C75A2E75
>CBAC0534
>
>Now what do I do with it? How do I access data set on the session on 
>the previous context?
>
>Thanks a lot
>
>G.




-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download 
Messenger Now

RE: encodeURL / jsessionid

2004-02-25 Thread Mike Curwen
when you say 'app1' and 'app2', what do you mean?
Sessions are not shared between two different web-apps.


> -Original Message-
> From: Jerald Powel [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, February 25, 2004 3:46 AM
> To: Tomcat Users List
> Subject: Re: encodeURL / jsessionid
> 
> 
> That was my first move, but it was null
>  
> G.
> 
> 
> Antonio_Fiol_Bonnín <[EMAIL PROTECTED]> wrote:
> 
> <%= request.getSession().getAttribute("id"); %>
> 
> 
> 
> 
> Jerald Powel wrote:
> 
> >Hi,
> >
> > I wish to maintain state across contexts and have in app1:
> >
> >
> >
> >">app2
> >
> >when app2 is loaded the jsessionid is visible in the address bar:
> >
> >http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142
E8C75A2E75
>CBAC0534
>
>Now what do I do with it? How do I access data set on the session on 
>the previous context?
>
>Thanks a lot
>
>G.
> 
>



> ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s



-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today!
Download Messenger Now


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



Re: encodeURL / jsessionid

2004-02-25 Thread Jerald Powel
That was my first move, but it was null
 
G.


Antonio_Fiol_Bonnín <[EMAIL PROTECTED]> wrote:

<%= request.getSession().getAttribute("id"); %>




Jerald Powel wrote:

>Hi, 
>
> I wish to maintain state across contexts and have in app1:
>
>
>
>">app2
>
>when app2 is loaded the jsessionid is visible in the address bar:
>
>http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534
>
>Now what do I do with it? How do I access data set on the session on the previous 
>context?
>
>Thanks a lot
>
>G.
> 
>



> ATTACHMENT part 2 application/x-pkcs7-signature name=smime.p7s



-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download 
Messenger Now

Re: encodeURL / jsessionid

2004-02-24 Thread Antonio Fiol Bonnín
<%= request.getSession().getAttribute("id"); %>

Jerald Powel wrote:

Hi, 

I wish to maintain state across contexts and have in app1:

<% request.getSession().setAttribute("id","2004073258"); %>

">app2

when app2 is loaded the jsessionid is visible in the address bar:

http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534

Now what do I do with it? How do I access data set on the session on the previous context?

Thanks a lot

G.
 




smime.p7s
Description: S/MIME Cryptographic Signature


encodeURL / jsessionid

2004-02-24 Thread Jerald Powel

Hi, 

 I wish to maintain state across contexts and have in app1:

<% request.getSession().setAttribute("id","2004073258"); %>

">app2

when app2 is loaded the jsessionid is visible in the address bar:

http://localhost:8086/app2/index.jsp;jsessionid=7DD63005E4142E8C75A2E75CBAC0534

Now what do I do with it? How do I access data set on the session on the previous 
context?

Thanks a lot

G.

 

 


-
  Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download 
Messenger Now