简体   繁体   中英

Providing action parameter value in struts-config in Struts1

Just as in Struts2 we can provide a parameter value in struts.xml as below

<action name="myS2Action" class="demo.myS2Action">
    <result>/myS2Page.jsp</result>
    <param name="myS2Param">value</param>
</action>

In Struts1, Is there any way to set some parameter value in struts-config.xml?

I have following entries in struts-config.xml

<form-bean name="myS1Form" type="demo.MyS1Form"></form-bean>
<action path="/myS1Action" type="demo.myS1Action" name="myS1Form" scope="request" >
    <forward name="success" path="/myS1Page.jsp"></forward>
</action>

In Strut1 configuration, we can use set-property tag. Following question is related to usage of set-property tag.

In Struts1, how to use set-property tag inside action tag?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM