It's not a secret anymore!
The moose likes Servlets and the fly likes Session tracking Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session tracking" Watch "Session tracking" New topic

Session tracking

Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 411
Hi All
I m using javawebserver2.0 trial version
I m using HttpSession object for session tracking
in which I put a vector in my first servlet where i create this session
through this servlet i popup a jsp through a hyperlink
and after entering some values in input fields of that JSP
i add those values in a vector and add that vector to the vector which i put in session object in the first servlet
Now on submit button of jsp i call another servlet in which i try to retrive values of the session vector .
Problem i am facing is that
on first time whenever i load my first servlet and reach to last servlet via JSP
it always give nullpointerexception but if i refresh the browser and reload the first servlet it starts working fine
Can anyone pls give me a hint where i may be wrong

SCJP,SCWCD,SCBCD<br />If Opportunity doesn't knock then build the door
I agree. Here's the link:
subject: Session tracking
jQuery in Action, 3rd edition