开发者

Regarding Struts configuration files

开发者 https://www.devze.com 2023-01-27 21:57 出处:网络
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

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消