|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--org.apache.struts.action.ActionMapping
|
+--org.beyondcode.struts.dispatcher.DispatcherMappingImpl
This class provides a default implementation of the
DispatcherMapping interface. It can be
used instead of org.apache.struts.action.ActionMapping
with the dispatcher package. Specify in the deployment descriptor
web.xml:
<servlet>
...
<init-param>
<param-name>mapping</param-name>
<param-value>org.beyondcode.struts.dispatcher.DispatcherMappingImpl</param-value>
</init-param>
</servlet>
This class also provides a simple selftest method, which can be
used to check the mappings read from struts-config.xml
for existence of all four "standard" forwards.
| Field Summary |
| Fields inherited from class org.apache.struts.action.ActionMapping |
attribute, forward, forwards, include, input, instance, mappings, multipartClass, name, parameter, path, prefix, scope, suffix, type, unknown, validate |
| Constructor Summary | |
DispatcherMappingImpl()
|
|
| Method Summary | |
org.apache.struts.action.ActionForward |
denied()
Get the 'access denied' ActionForward. |
org.apache.struts.action.ActionForward |
error()
Get the 'error' ActionForward. |
org.apache.struts.action.ActionForward |
failure()
Get the 'failure' ActionForward. |
java.lang.String |
getAccess()
Get the access control information for this mapping. |
java.lang.String |
getMethod()
Get the name of the function to which this action should be dispatched. |
static java.lang.String[] |
reportErrors(org.apache.struts.action.ActionMappings allMappings)
Given the ActionMappings maintained by the
ActionServlet, this function checks whether
the non-null "standard" forwards exist for all
mappings. |
void |
setAccess(java.lang.String a)
Set the access control information for this mapping. |
void |
setMethod(java.lang.String m)
Set the name of the function to which this action should be dispatched. |
org.apache.struts.action.ActionForward |
success()
Get the 'success' ActionForward. |
| Methods inherited from class org.apache.struts.action.ActionMapping |
addForward, createFormInstance, findForward, findForwards, getActionClass, getAttribute, getFormAttribute, getFormClass, getFormPrefix, getFormScope, getFormSuffix, getForward, getInclude, getInput, getInputForm, getMappings, getMultipartClass, getName, getParameter, getPath, getPrefix, getScope, getSuffix, getType, getUnknown, getValidate, removeForward, setActionClass, setAttribute, setFormAttribute, setFormClass, setFormPrefix, setFormScope, setFormSuffix, setForward, setInclude, setInput, setInputForm, setMappings, setMultipartClass, setName, setParameter, setPath, setPrefix, setScope, setSuffix, setType, setUnknown, setValidate, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public DispatcherMappingImpl()
| Method Detail |
public java.lang.String getMethod()
getMethod in interface DispatcherMappingpublic void setMethod(java.lang.String m)
setMethod in interface DispatcherMappingm - The method name;public java.lang.String getAccess()
getAccess in interface DispatcherMappingpublic void setAccess(java.lang.String a)
setAccess in interface DispatcherMappinga - The access information.public org.apache.struts.action.ActionForward success()
ActionForward.
success in interface DispatcherMappingActionForward for "success",
null if not found.public org.apache.struts.action.ActionForward failure()
ActionForward.
failure in interface DispatcherMappingActionForward for "failure". If this is not found,
the global error forward is returned, if this is not found,
null is returned.public org.apache.struts.action.ActionForward denied()
ActionForward.
denied in interface DispatcherMappingActionForward for "denied". If this is not found,
the global forward for "denied" is returned, if this is not found,
the global "error" forward is returned, if this is not found,
null is returned.public org.apache.struts.action.ActionForward error()
ActionForward.
error in interface DispatcherMappingActionForward for "error". If this is not found,
the global "error" forward is returned, if this is not found,
null is returned.public static java.lang.String[] reportErrors(org.apache.struts.action.ActionMappings allMappings)
ActionMappings maintained by the
ActionServlet, this function checks whether
the non-null "standard" forwards exist for all
mappings. The four forward names considered "standard" are
"success", "failure", "denied", and "error".
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||