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("");
}
}