如何使用web.xml更改Struts-config.xml的名称?

How to change the name of Struts-config.xml using web.xml?

我想使用 web.xmlstruts.config.xml 文件的名称更改为另一个名称,例如 abc.xml。是否可以使用 web.xml 文件或任何其他方式重命名 struts.config.xml

您可以只重命名文件本身,它应该与 web.xml 文件一起在您的 WEB-INF 文件夹中。您还需要在 web.xml 文件(下面的 abc.xml)中做一个小改动。

<init-param>
<param-name>config</param-name>
<param-value>/WEB-INF/abc.xml</param-value>
</init-param>