Session in Struts2 and Google App Engine Im using Struts2 running in google app engine.

User can use their google and facebook account to login to the site. When a user login, i have:

session.put("email", email);


When a user log-out, I have

session.remove("email");


In Struts2 Action, I have the following:

public class ChapterAction extends ActionSupport implements SessionAware{

    private static final long serialVersionUID = 1L;
    private Map&lt;String, Object&gt; session;

    public Map&lt;String, Object&gt; getSession() {
        return session;
    }
    public void setSession(Map&lt;String, Object&gt; session) {
        this.session = session;
    }

    public String add() throws Exception{
        String email = (String) session.get("email");
        if ( email == null)
            return LOGIN; 

        //business logic here

        return SUCCESS;
    }
}


Please critic my code. Is the above usage of session OK and secure?

Thanks
Code looks good, But why not move this Part:

String email = (String) session.get("email");
if ( email == null)
    return LOGIN; 


into an Interceptor? Or do you have only one relevant Action?