順序 |
配置文件名 |
所在位置 |
說明 |
1 |
default.properties |
struts2-core-2.x.x.jar\org\apache\struts2 |
不能修改 |
2 |
struts-default.xml |
struts2-core-2.x.x.x.jar |
不能修改 |
3 |
strtuts-plugin.xml |
在struts2提供的插件jar包中 |
不能修改 |
4 |
struts.xml |
我們的應用中 |
我們自己編寫 |
5 |
struts.properties |
我們的應用中 |
我們自己編寫 |
6 |
web.xml |
我們的應用中 |
我們自己編寫 |
如果多個文件配置了同一個struts2 常量,則後一個文件中配置的常量值會覆蓋前面文件配置的常量值。
注意:由上可以看出:當應用被tomcat加載的時候,struts2的配置文件就已經被加載過了。