Package org.xadoop.servlet.actions

Source Code of org.xadoop.servlet.actions.LogoutAction

package org.xadoop.servlet.actions;

import javax.servlet.http.HttpServletRequest;

import org.xadoop.SessionAttrs;
import org.xadoop.servlet.actions.results.AbstractResult;
import org.xadoop.servlet.actions.results.Success;

/**
* An action to logout.
*
* @author Lukas Blunschi
*/
public class LogoutAction extends AbstractAction {

  public static final String ACTIONNAME = "logout";

  public AbstractResult execute(HttpServletRequest req) {

    // remove username from session
    req.getSession().removeAttribute(SessionAttrs.USERNAME);
    return new Success("");
  }

}
TOP

Related Classes of org.xadoop.servlet.actions.LogoutAction

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.