Action mapping contains all the deployment information for a particular Action bean.
This class is to determine where the results of the Action will be sent once its processing is complete.
We can specify the action mapping in the configuration file called struts-config.xml.
Struts framework creates ActionMapping object from <ActionMapping> configuration element of struts-config.xml file
Example
<action-mappings>
<action path="/submit" type="com.shaan.SubmitAction" name="submitForm"
input="/submit.jsp" scope="request" validate="true">
<forward name="success" path="/success.jsp" />
<forward name="failure" path="/error.jsp" />
</action>
</action-mappings>
No comments:
Post a Comment
Note: only a member of this blog may post a comment.