스트러츠(struts) 2는 기본으로 아래와 같은 환경파일을 사용하고 있다. 이 파일들 중에 struts.properties 파일이 스트러츠 2의 기본 설정을 가지고 있다.
File |
Optional |
Location | Purpose |
---|---|---|---|
web.xml | no | /WEB-INF/ | Web deployment descriptor to include all necessary framework components |
struts.xml | yes | /WEB-INF/classes/ | Main configuration, contains result/view types, action mappings, interceptors, and so forth |
struts.properties | yes | /WEB-INF/classes/ | Framework properties |
struts-default.xml | yes | /WEB-INF/lib/struts2-core.jar | Default configuration provided by Struts |
struts-default.vm | yes | /WEB-INF/classes/ | Default macros referenced by velocity.properties |
struts-plugin.xml | yes | At the root of a plugin JAR | Optional configuration files for Plugins struts.xml. in the same format as |
velocity.properties | yes | /WEB-INF/classes/ | Override the default Velocity configuration |
위 설정 파일들 중에서 struts.properties 에서
### Used by the DefaultActionMapper
### You may provide a comma separated list, e.g.
struts.action.extension=action,jnlp,do struts.action.extension=action
위의 빨간색 설정 부분을
xxx,do,action 등과 같이 우선순위가 높은 순서대로 설정 하면 된다.