...
- Copy to your
webapp/lib
directory- the
struts2-core-(VERSION).jar
, - all the
*.jar
files in/lib/default
, and - any necessary optional
*.jar
files from/lib/
.
- the
Tip |
---|
If you need to customize your own templates (how HTML is rendered from Struts UI tags), copy into your |
Install the Minimum
...
Set of Libraries and Configuration Files
The following files are a minium requirement for your application.
Filename | Description |
---|---|
| Framework library itself, found in distribution root directory |
| XWork library on which Struts 2 is built (version 2.0 or later) |
| OSCore, a general-utility library from OpenSymphony |
| Object Graph Navigation Language (OGNL), the expression language used throughout the framework |
| Commons logging, which the framework uses to support transparently logging to either Log4J or JDK 1.4+ |
| All UI tag templates are written in Freemarker , which is (also a good option for your own views) |
| The default dependency injection container for the framework. |
| Java web application configuration file that defines the servlets, JSP tag |
| Framework configuration file that defines the actions, results, and interceptors for your application |
...
The standard web.xml
registers a FilterDispatcher to enable framework functionality for your requests. The ContextLoaderListener configures Spring as our dependency injection conitainercontainer. The framework uses Spring internally, and you . (You may wish to use it Spring to deploy your own objects too.)
See also: web.xml
Setup the Struts Configuration (struts.xml
)
...
- It tells the framework that it should import the configuration information from
struts-default.xml
. (This file is located at the root of thestruts2-core.jar
, so it is sure to be found.)
...