You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Paul McKean <Pa...@maf.nasa.gov> on 2000/04/18 22:26:57 UTC
sessions within WEB-APP
I'm stumped.
I'm attempting to use session tracking for user authentication and
application security like the examples in the O'Reilly JAVA Servlet
Programming book. Everything seems to work fine so long as my
"transaction" servlet and my "login" servlet are in the same package;
however, when they are in different packages, the two servlets get
separate session IDs. Why? They are both in the same WEB-APP.
Any help will be greatly appreciated.
--
Paul C. McKean Jr.
Technical Audit & Systems Compliance
Lockheed Martin Space Systems Company - Michoud Operations
phone: (504) 257-1213
Re: sessions within WEB-APP
Posted by "Craig R. McClanahan" <Cr...@eng.sun.com>.
Paul McKean wrote:
> I'm stumped.
>
> I'm attempting to use session tracking for user authentication and
> application security like the examples in the O'Reilly JAVA Servlet
> Programming book. Everything seems to work fine so long as my
> "transaction" servlet and my "login" servlet are in the same package;
> however, when they are in different packages, the two servlets get
> separate session IDs. Why? They are both in the same WEB-APP.
>
Java packages make no difference at all. The thing that matters are:
* Are they really in the same webapp? In other words, does the
URL you access them with both start with the same context path?
* Do you have cookies enabled? If not, are you using
URL rewriting (response.encodeURL()) correctly? (Note:
support for URL rewriting was added to Tomcat fairly
recently -- try it with the most recent 3.1 release candidate
or the final release when available).
> Paul C. McKean Jr.
Craig McClanahan