Regarding Struts configuration files
Where do we need to put the struts configuration files in a web applicatio开发者_开发问答n? And, what is the differences between struts.xml and struts-config.xml? For Struts 2 applications, which one we should use?
Thanks.
As indicated in Vinodh's link, struts.xml
is the default name of the configuration file in Struts2. struts-config.xml
is a Struts1 configuration file, and should not be used in Struts2.
Your struts.xml
file should be at the root of your class path so that once your web app is built, it will be located in WEB-INF/classes. You can accomplish this by placing it in your source folder. If you use the Maven 2 Standard Directory Layout, then you would place it in src/main/resources.
精彩评论