struts2-convention and struts2-config-browser-plugin cannot work if i change struts.xml path

538 Views Asked by At

I use struts2-convention-plugin and struts2-config-browser-plugin in struts2, if i change the default struts.xml path in web.xml:

<filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>
    <init-param> 
        <param-name>config</param-name>
        <param-value>struts-default.xml,struts-plugin.xml,struts/struts.xml</param-value> 
    </init-param> 
 </filter>

they cannot work anymore, why?

1

There are 1 best solutions below

3
Roman C On

struts/struts.xml is used to locate the Struts configuration file, but it cannot open it because it doesn't exist. Use struts.xml instead and put it onto classpath.