Have you activated Security & Authentication in the web.xml?

http://code.google.com/appengine/docs/java/config/webxml.html#Security_and_Authentication


<http://code.google.com/appengine/docs/java/config/webxml.html#Security_and_Authentication>
  fabrizio

On Wed, Apr 13, 2011 at 7:44 AM, Peter <ptr...@gmail.com> wrote:

> Folks,
>
> I am a bit confused on how to use user services correctly.
>
> Here is the relevant code snippet:
>
> public class GreetingServiceImple extends RemoteServiceServlet implements
> GreetingService {
>
>    public string greetServer() {
>         UserService us = UserServiceFactory.getUserService();
>         User user = us.getCurrentUser();
>         ...
>    }
> }
>
> The problem is, the value returned by getCurrentUser is always null,
> irrespective of whether I deploy locally or at appspot.
>
> I am using Firefox as the client. I have two tabs open. On one tab, I am
> signed into Google mail using my gmail account. On the other tab, I am
> trying to run the app that I am working on.
>
> What is it that I am missing?
>
> Thank you in advance for your help.
>
> Regards,
> Peter
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google App Engine for Java" group.
> To post to this group, send email to
> google-appengine-java@googlegroups.com.
> To unsubscribe from this group, send email to
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/google-appengine-java?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-java@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.

Reply via email to