|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.struts.action.Action
jp.terasoluna.fw.web.struts.actions.ActionEx
jp.terasoluna.fw.web.struts.actions.ForwardAction
public class ForwardAction
Simple forward action.
It inherits ActionEx functions (transition log output / transaction token check) and forwards to JSP. Like the ForwardAction provided by Struts, this action forwards to the destination specified in the "parameter" attribute of struts-config.xml. when the "parameter" attribute is not set, it fetches the action forward with the logical forward name as "success". When the forward destination is not set, it returns the error SC_NOT_FOUND(404). When the direct access to the *.jsp file is prohibited, it is necessary to make the entry in struts-config.xml by using this action in order to display the JSP without performing any business/application processing. Process which is performed by ActionEx#execute(), is also inherited here.
Description example of Bean definition file and struts-config.xml, is shown below.
Example:
<action path="/foo"
parameter="/foo.jsp">
</action>
<action path="/foo"
parameter="/foo.jsp">
<forward name="success" path="/foo.jsp" module="/sub1" redirect="true">
</action>
<action path="/pagelinkForward"
parameter="/pagelink/sc2401.jsp"/>
<action path="/pagelinkForward"
parameter="/sc2401.jsp"/>
forwardAction.contextRelative=true
Field Summary | |
---|---|
private static java.lang.String |
FORWARD_ACTION_CONTEXT_RELATIVE_KEY
Property key of the value set in the contextRelative |
private static java.lang.String |
FORWARD_ERRORPAGE_ERROR
Error page (404) Error code indicating the transition failure. |
private static java.lang.String |
FORWARD_SUCCESS
Logical forward name. |
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 | |
---|---|
ForwardAction()
|
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)
Sets the value (destination page) of "parameter" attribute to the action forward and returns action forward. When "parameter" attribute is not set, returns the action forward with the logical forward name as "success". When neither of the above is 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 |
---|
private static org.apache.commons.logging.Log log
private static final java.lang.String FORWARD_ERRORPAGE_ERROR
private static final java.lang.String FORWARD_SUCCESS
private static final java.lang.String FORWARD_ACTION_CONTEXT_RELATIVE_KEY
Constructor Detail |
---|
public ForwardAction()
Method Detail |
---|
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)
doExecute
in class ActionEx
mapping
- Action mappingform
- Action formreq
- HTTP requestres
- HTTP response
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |