开发者

understanding of struts1.x configuration file

below is the code in struts config file

<action-mappings type="com.jpmc.invconfirm.presentation.struts.controllers.InvestorConfirmActionMapping">
    <action path="/getLoanDetail" 
            type="com.jpmc.invconfirm.base.presentation.struts.actions.StrutsIoCAction" 
            name="InvConfLoanDetailPageLoadForm" 
            parameter="GET_LOAN_DETAIL"  
            input="welcomePage" 
            validate="false"
            scope="request">
        <forwar开发者_运维技巧d name="success" path="loandetail" />
        <forward name="failure" path="sysError" />
    </action>
</action-mappings>

My question is,

  1. what the "type" attribute in element will do.
  2. what the "PARAMETER" attribute in element will do.


"type" refers to the classname of the Action. "parameter" refers to the request parameter for the Action.

May I suggest finding a good book on the Struts framework? There are several out there.


http://www.amazon.com/Jakarta-Struts-Pocket-Reference-Cavaness/dp/0596005199

http://struts.apache.org/1.x/userGuide/building_controller.html#actionmapping


type element refers the action class name with package.

The request parameter name is specified using the parameter attribute. Here the request parameter name is GET_LOAN_DETAIL. The request parameter name specified in the action handler is "GET_LOAN_DETAIL". So this should be specified as the property name for the submit button.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜