Versions Compared

Key

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

...

  • 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/.
Tip

If you need to customize your own templates (how HTML is rendered from Struts UI tags), copy into your webapp directory the /src/java/template directory.

Install the Minimum

...

Set of Libraries and Configuration Files

The following files are a minium requirement for your application.

Filename

Description

struts2-core.jar

Framework library itself, found in distribution root directory

xwork.jar

XWork library on which Struts 2 is built (version 2.0 or later)

oscore.jar

OSCore, a general-utility library from OpenSymphony

ognl.jar

Object Graph Navigation Language (OGNL), the expression language used throughout the framework

commons-logging.jar

Commons logging, which the framework uses to support transparently logging to either Log4J or JDK 1.4+

freemarker.jar

All UI tag templates are written in Freemarker , which is (also a good option for your own views)

spring*.jar

The default dependency injection container for the framework.

web.xml

Java web application configuration file that defines the servlets, JSP tag
libraries, and so on filters (and other components) for your web application

struts.xml

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.)

(lightbulb) 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 the struts2-core.jar, so it is sure to be found.)

...