Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment:

Note the default .vm file

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.

...

File

Optional

Location (relative to webapp)

Purpose

web.xml

no

/WEB-INF/

Web deployment descriptor to include all necessary framework components

action.xml

no

/WEB-INF/classes/

Main configuration, contains result/view types, action mappings, interceptors, and so forth

action.properties

yes

/WEB-INF/classes/

Framework properties

action-default.xml

yes

/WEB-INF/lib/struts-action-x.x.jar

Default configuration that should be included in action.xml<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="c330c3d1-d625-4c81-a110-35c02ac8f592"><ac:plain-text-body><![CDATA[

[velocity.properties]

yes

/WEB-INF/classes/

Override the default [Velocity] configuration ]]></ac:plain-text-body></ac:structured-macro>

action-default.vm

yes

/WEB-INF/classes/

Default macros referenced by velocity.properties

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 applciationapplication's class path.

By default, the following packages are searched:

...

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