开发者

where to place the struts.xml file

I need to know...where we have to place the struts.xml file...Is there any possibilities of changing the location of struts.xml 开发者_运维问答file


By default, it is looked for in the classpath's root level.

Place yours directly under WEB-INF/classes (or to a place where someone/something grabs it and puts it there, typically the root of a source folder, such as src/main/resources if you are using Maven).

Another option would be to have it packaged at the root level of a JAR in your WEB-INF/lib. A struts.xml in WEB-INF/classes gets precedence though. I have yet to come across an example where this option would make sense though.


If you have a simple dynamic web project, I recommend putting it under the src folder. This is because it simply works. You can create a classes folder underneath the WEB-INF folder and move it there as well.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜