I am attempting to use a session object to store user-entered preferences in an application. I get a reference to a session object in the first of 3
servlets utilized in the app, no problem. I successfully setAttribute(). In a subsequent servlet (#2), I similarly get a reference to the session object created in servlet #1 (verified by getting and displaying session id). I can successfully set and getAttribute(). My problem is in calling servlet #3 (from the HTML form returned to client in servlet #2). When I attempt to get a reference to the existing session object, a new session object is created instead (again, as verified by getting and displaying session id). Subsequently, every attribute value is null when I attempt to retrieve it. I coded another, separate application servlet that I can run at this point (post creation of the new session object) which can successfull get a reference to the original session object, and get the attribute values which servlet #3 cannot. I've simplified servlet #3 so that all it does is simply get the session obj and return it in HTML to the client... it alway gets a new session id, attribute values are null. I'm a student and have tried everything I can to resolve the problem, but I think I may be out of my league. What really concerns me is that none of my instructors have any real insight into the problem. If I don't sound desperate, trust me, I am. Any insight/guidence would be most appreciated. A box of delicious girl scout cookies (without headers!) to anyone who might be able to shed some light!!! Running
Tomcat 3.2.1, servlet API 2.2,
java 1.3.1 on W2K. Others in the class have no problem. Server config?
Well, thanks... Steve