Search code examples
javastruts-1

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


I want to change the name of struts.config.xml file to another name something like abc.xml using the web.xml. Is it possible to rename the struts.config.xml using the web.xml file or any other way to rename it?


Solution

  • You can just rename the file itself, it should be in your WEB-INF folder together with the web.xml file. You also need to do a small change in the web.xml file (abc.xml below).

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