Struts 1 在struts-config.xml中,操作有一个;属性";属性。什么';它是干什么的?
在我们的web应用程序的struts-config.xml文件中,定义了大量的Struts 1 在struts-config.xml中,操作有一个;属性";属性。什么';它是干什么的?,struts-1,struts-config,Struts 1,Struts Config,在我们的web应用程序的struts-config.xml文件中,定义了大量的s,它们在大多数文件上都有名称和属性属性,两个文件中都有表单名称。例如: <action attribute="LoginForm" <-- this line name="LoginForm" path="/welcome" type="com.foo.presentation.action.LandingActionPre"> <forward na
s,它们在大多数文件上都有名称
和属性
属性,两个文件中都有表单名称。例如:
<action
attribute="LoginForm" <-- this line
name="LoginForm"
path="/welcome"
type="com.foo.presentation.action.LandingActionPre">
<forward name="SUCCESS" path="landing.welcome" />
<forward name="ALREADY_LOGGED_IN" path="/landing.do?m=getLandingPage" redirect="true"/>
</action>
根据,它被用作ActionForm的一种别名
如果它与名称
相同,则不起任何作用。但是如果指定了名称
,并且指定了属性
,并且与名称
不同,则可以使用名称
或属性
的值来访问表单
相关章节:
<!-- The "action" element describes an ActionMapping object that is to be used
to process a request for a specific module-relative URI. The following
attributes are defined:
attribute Name of the request-scope or session-scope attribute that
is used to access our ActionForm bean, if it is other than
the bean's specified "name". Optional if "name" is specified,
else not valid.
我从未听说过这个属性。如果省略它会有区别吗?好吧,我有一个
,它在属性
和名称
中具有不同的形式名称,并且使用了名称
一个。所以我想不是。[编辑:]如果我删除它,似乎什么都不会发生,好的或坏的。所以可能就像你说的,每个人都只是为了安全起见复制并粘贴了它。。。还有文件。