This week's book giveaway is in the OCAJP 8 forum.
We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line!
See this thread for details.
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

Win a copy of OCA Java SE 8 Programmer I Study Guide this week in the OCAJP 8 forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Session tracking" Watch "Session tracking" New topic

Session tracking

Gaurav Chikara
Ranch Hand

Joined: Jun 09, 2000
Posts: 410
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
Don't get me started about those stupid light bulbs.
subject: Session tracking
It's not a secret anymore!