I want to know how to change default location of struts.xml in Struts 2?
Thank for your help!
Asked
Active
Viewed 2,814 times
0

informatik01
- 16,038
- 10
- 74
- 104

tandaica0612
- 369
- 10
- 23
-
Is there any particular reason you want to change the default location of the xml file? Its location shouldn't matter to your webapp – Zeeno Sep 02 '11 at 10:52
3 Answers
3
To answer the question, the filter configuration accepts a "config" parameter that specifies the location(s) of S2 configuration files:

Dave Newton
- 158,873
- 26
- 254
- 302
2
Did you have a look at the documentation?
Here it says that struts.xml should reside on the classpath of the webapp
, so the location shouldn't matter, as long as it is in the classpath.
Additional link: http://struts.apache.org/2.x/docs/struts-1-solutions.html (Note that although it says Struts 1 Solutions it talks about Struts 2 - it's more of a migration guide)

Thomas
- 87,414
- 12
- 119
- 157
1
Struts only needs to be in the class path of the webapp. Its location is irrelevant.

Zeeno
- 2,671
- 9
- 37
- 60