简体   繁体   English

在Struts1的struts-config中提供操作参数值

[英]Providing action parameter value in struts-config in Struts1

Just as in Struts2 we can provide a parameter value in struts.xml as below 就像在Struts2中一样,我们可以在struts.xml中提供一个参数值,如下所示

<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? 在Struts1中,是否可以在struts-config.xml中设置一些参数值?

I have following entries in struts-config.xml 我在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. 在Strut1配置中,我们可以使用set-property标签。 Following question is related to usage of set-property tag. 以下问题与set-property标签的用法有关。

In Struts1, how to use set-property tag inside action tag? 在Struts1中,如何在动作标签内使用set-property标签?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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