Forum

Number Of Page View:100,000+/Months
LOGIN |New User

Reply

Can I have more than one struts-config.xml file for a single Struts application?

Yes! One can have more than one struts-config.xml file for a single Struts application. You can define different struts-conifg.xml file for different modules in a single web application. It is useful when you are developing a distributed application.
But you must enter those struts-config.xml files details in deployment descripter (i.e., web.xml) file.

Example:
<init-param>
<param-name> config</param-name>
<param-value>/WEB-INF/struts-first-config.xml,/WEB-INF/struts-second-config.xml,/WEB-INF/struts-third-config.xml</param-value>
</init-param>

Here three struts configutation files are deployed in a single application.