java - GAE receiving Mail: can not get current user -


following gae tutorial managed running , servlet can receve incoming mails @ local dev server.

as far understand when inbound mail sent application, admin login used send request, when try current user using

user user = userservicefactory.getuserservice().getcurrentuser(); 

the user null, what's wrong here? in app admin required further procession incoming email.

any great.

my configuartion below:

<servlet>   <servlet-name>mailhandler</servlet-name>   <servlet-class>mailhandlerservlet</servlet-class> </servlet> <servlet-mapping>   <servlet-name>mailhandler</servlet-name>   <url-pattern>/_ah/mail/*</url-pattern> </servlet-mapping> <security-constraint>   <web-resource-collection>     <url-pattern>/_ah/mail/*</url-pattern>   </web-resource-collection>   <auth-constraint>     <role-name>admin</role-name>   </auth-constraint> </security-constraint>   public class mailhandlerservlet extends httpservlet {     @override     public void dopost( httpservletrequest req, httpservletresponse resp ) throws ioexception     {         user u = userservicefactory.getuserservice().getcurrentuser();         system.out.println( u );     } } 


Comments

Popular posts from this blog

Change php variable from jquery value using ajax (same page) -

Pull out data related to my apps from Android Play Store and iOS App Store -

How can I fetch data from a web server in an android application? -