...
File | Optional | Location (relative to webapp) | Purpose | ||
---|---|---|---|---|---|
no | /WEB-INF/ | Web deployment descriptor to include all necessary framework components | |||
no | /WEB-INF/classes/ | Main configuration, contains result/view types, action mappings, interceptors, and so forth | |||
yes | /WEB-INF/classes/ | Framework properties | |||
yes | /WEB-INF/lib/strutsstruts2-action-xcore.x.jar | Default configuration that should be included in | |||
velocitystruts-default.propertiesvm | yes | /WEB-INF/classes/ | Default macros referenced by | ||
struts-plugin.xml | yes | At the root of a plugin JAR | Optional configuration files for Plugins in the same format as | ||
Override the default Velocity configuration | yes | /WEB-INF/classes/ | Default macros referenced by |
Static Content
Common static content that is needed by the framework (JavaScript and CSS files, etc.) is served automatically by the FilterDispatcher filter. Any request starting with "/struts/
" denotes that static content is required, and then mapping the value after "/struts/
" to common packages in Struts 2 the framework and, optionally in the application's class path.
...
Additional packages can be specified by providing a comma separated list to the configuration parameter named "packages" (configured in web.xml for the FilterDispatcher filter). When specifying additional static content, you should be careful not to expose sensitive configuration information (i.e. database passwordsuch as the password to a database).