how can i extract row http data from request

2009-06-08 Thread Meir Yanovich
Hello all
i need to deal with legacy web app code , that needs to add basic
authentication to it with sessions
now i need to be able to extract the session id from the header (
can't add sessions into the code )
the scenario is that only once and only once per page i pass the
session into the server side.
but in the next server side calls i don't have it and i can add code
to pass it into the server side call
since i have the session from the first time i will save it into the
map with the session id as the key.
now i need only to be able to extract the session id on every client request .
my question is .. can it be done ?
Thanks

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org



RE: how can i extract row http data from request

2009-06-08 Thread Peter Crowther
 From: Meir Yanovich [mailto:meiry...@gmail.com]
 i need to deal with legacy web app code , that needs to add basic
 authentication to it with sessions
 now i need to be able to extract the session id from the header (
 can't add sessions into the code )
 the scenario is that only once and only once per page i pass the
 session into the server side.
 but in the next server side calls i don't have it and i can add code
 to pass it into the server side call
 since i have the session from the first time i will save it into the
 map with the session id as the key.
 now i need only to be able to extract the session id on every
 client request .
 my question is .. can it be done ?

If I'm answering the right question...

Create a Filter.  Filters can do things to requests and responses before and/or 
after the legacy web app code sees the request.  The Filter can handle the 
authentication, for example by setting a cookie on a first response in a new 
session, and reading the cookie afterwards.

I suspect some of the other people on the list may have more information on how 
to do this - I know the theory, but haven't had to deal with authentication in 
reality!

- Peter

-
To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
For additional commands, e-mail: users-h...@tomcat.apache.org