jp.terasoluna.fw.web.struts.actions
Class LogoffAction

java.lang.Object
  extended by org.apache.struts.action.Action
      extended by jp.terasoluna.fw.web.struts.actions.ActionEx
          extended by jp.terasoluna.fw.web.struts.actions.LogoffAction

public class LogoffAction
extends ActionEx

Action that executes logoff process.

This class invalidates the current HTTP session and forwards to the destination page specified in parameter attribute of <action> element in struts-config.xml. Configuration of struts-config.xml and Bean definition file is as shown below.

Configuration of Bean definition file

  <bean name="/logoff" scope="prototype"
      class="jp.terasoluna.fw.web.struts.actions.LogoffAction">
  </bean>
  

Configuration of struts-config.xml

 <action path="/logoff"
     name="_logonForm"
     scope="session"
     parameter="/foo.jsp">
 </action>
 
For the login process, refer to UserValueObject and BLogic.


Field Summary
private static java.lang.String FORWARD_ERRORPAGE_ERROR
          Error page(404)Error code indicating that the transition has failed.
private static org.apache.commons.logging.Log log
          Log class.
 
Fields inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx
FORWARD_TXTOKEN_ERROR
 
Fields inherited from class org.apache.struts.action.Action
defaultLocale, servlet
 
Constructor Summary
LogoffAction()
           
 
Method Summary
 org.apache.struts.action.ActionForward doExecute(org.apache.struts.action.ActionMapping mapping, org.apache.struts.action.ActionForm form, javax.servlet.http.HttpServletRequest req, javax.servlet.http.HttpServletResponse res)
          Executes logoff process. Invalidates the HTTP session, and returns the action forward set with the value (destination page) of "parameter" attribute. When the parameter attribute is not set, returns the error (404).
 
Methods inherited from class jp.terasoluna.fw.web.struts.actions.ActionEx
addErrors, addMessages, execute, isSaveToken, isTokenCheck, processTokenCheck, setSaveToken, setTokenCheck
 
Methods inherited from class org.apache.struts.action.Action
addErrors, addMessages, execute, generateToken, getDataSource, getDataSource, getErrors, getLocale, getMessages, getResources, getResources, getServlet, isCancelled, isTokenValid, isTokenValid, resetToken, saveErrors, saveErrors, saveErrors, saveMessages, saveMessages, saveToken, setLocale, setServlet
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

private static org.apache.commons.logging.Log log
Log class.


FORWARD_ERRORPAGE_ERROR

private static final java.lang.String FORWARD_ERRORPAGE_ERROR
Error page(404)Error code indicating that the transition has failed.

See Also:
Constant Field Values
Constructor Detail

LogoffAction

public LogoffAction()
Method Detail

doExecute

public org.apache.struts.action.ActionForward doExecute(org.apache.struts.action.ActionMapping mapping,
                                                        org.apache.struts.action.ActionForm form,
                                                        javax.servlet.http.HttpServletRequest req,
                                                        javax.servlet.http.HttpServletResponse res)
Executes logoff process. Invalidates the HTTP session and returns the action forward set with the value (destination page) of "parameter" attribute. When parameter attribute is not set, returns error (404).

Specified by:
doExecute in class ActionEx
Parameters:
mapping - Action mapping
form - Action form
req - HTTP request
res - HTTP response
Returns:
Action forward