On Wed, Aug 14, 2013 at 12:26 AM, Nelson Paz y Miño <[email protected]>wrote:
> 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:
>
> 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)
>
>
How are you using Sessions? Are you using App Engine's built-in sessions
ability, or another framework? If you are using GAE's built-in sessions, do
you have async-session-persistence turned on (
https://developers.google.com/appengine/docs/java/config/appconfig#Java_appengine_web_xml_Enabling_sessions
),
and if so, how much time elapses between a user visiting the first servlet
and then the second servlet?
Try calling getAttributeNames() on the session object, see what else is
stored. The attribute name might be getting changed by a filter or another
servlet.
-----------------
-Vinny P
Technology & Media Advisor
Chicago, IL
App Engine Code Samples: http://www.learntogoogleit.com
--
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.