I have confusion about these files in struts2.
Normally struts.xml
file the core which has configuration in struts1. So I also thought of using struts.xml file.
But in my project already they put struts2-config-browser-plugin.jar
, it has struts-plugin.xml
. Just searched in Google and found that struts-plugin.xml
is enough to run struts application.
Now I'm adding the struts.xml
file, the application is not working.
Can I use both XML file in application?
If I remove the struts2-config-browser-plugin.jar
, what are the changes need to add in struts.xml
file ?
There are three configuration files which are by default loaded by the framework (if they exist):
struts-default.xml
- included in struts2-core.jar, contains all basic configuration of the frameworkstruts-plugin.xml
- if plugin want to override some defaults or define its own settings (results, actions, etc)struts.xml
- contains user defined configuration, mostly actions, results and custom stacks of interceptorsYou should just use struts.xml
and put all the configurations there.
Some notes about struts-plugin.xml
- http://struts.apache.org/development/2.x/docs/plugins.html