You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 30 Next »

Main Configuration Files

Two key configuration files utilized by the framework are web.xml and action.xml. The configuration elements in these two files will reference any other required or optional configuration files used by the framework.

Below are all the files that you may need to be aware of. Some of this configuration files can be reloaded dynamically, making development much easier. See Reloading configuration for more information.

File

Optional

Location (relative to webapp)

Purpose

web.xml

no

/WEB-INF/

Web deployment descriptor to include all necessary WebWork components

action.xml

no

/WEB-INF/classes/

Main configuration, contains result/view types, action mappings, interceptors, etc

action.properties

yes

/WEB-INF/classes/

WebWork properties

action-default.xml

yes

/WEB-INF/lib/webwork-x.x.jar

Default configuration that should be included in xwork.xml

velocity.properties

yes

/WEB-INF/classes/

Override the default velocity configuration

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 "/action/" denotes that static content is required, and then mapping the value after "/action/" to common packages in Struts Action 2 and, optionally in the applciation's class path.

By default, the following packages are searched:

  • org.apache.struts.action2.static
  • template

Additional packages can be specified by providing a comma seperated 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 password).

  • No labels