FileDocCategorySizeDatePackage
RestartAction.javaAPI DocExample850Sat Nov 22 19:35:12 GMT 2003s2wexample.controller.actions

RestartAction

public class RestartAction extends Object implements Action
An action to reset to the start of the WorkFlow

Fields Summary
Constructors Summary
Methods Summary
public booleanperformAction(javax.servlet.http.HttpServletRequest req, javax.servlet.ServletContext context)
Perform this action. Invalidate the session and create a new UserBean to replace the old one.

        // invalidate the current session
        req.getSession().invalidate();
     
        // create a new one, and add a new UserBean to it
        HttpSession session = req.getSession();
        UserBean ub = UserBeanFactory.newInstance();
        session.setAttribute(LoginAction.USERBEAN_ATTR, ub);
        
        return true;