Hello, I have a problem with session attributes shared across two servlets

In the first servlet (doGet method) I set the attributes like this:
               req.getSession().setAttribute("FBCurrID", fbcurrency);
               req.getSession().setAttribute("FBUserID", fname1);


I have checked and both  fbcurrency and fname1 are both Strings with valid 
values.

In the second servlet I try to get the info from the session like this:

String user_owner_id = req.getSession().getAttribute("FBUserID").toString();
String fbcurrency = req.getSession().getAttribute("FBCurrID").toString();

I'm able to get the first value, but not the second one. The browser is 
getting 500 Server Error:

Error: Server Error
The server encountered an error and could not complete your request.


The error I got in the App Engine Console Log is:


Uncaught exception from servlet
java.lang.NullPointerException
        at guestbook.FBFriendCall.doGet(FBFriendCall.java:27)

Is any restriction about sharing multiple session values across servlets? 
Please help

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/google-appengine.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to