Apache Struts 2 Documentation > Home > Guides > Core Developers Guide > Struts Configuration Elements |

Apache Struts 2 Documentation
Struts Configuration Elements
Edit Page Browse Space Add Page Add News
Added by Patrick Lightbody, last edited by Musachy Barroso on Jan 02, 2007 (view change) show comment hide comment
Comment: minor editing changes
View page history

A web application uses a deployment descriptor to initialize resources like servlets and taglibs. The deployment descriptor is formatted as a XML document and named "web.xml".

Likewise, the framework uses a configuration file to initialize its own resources. These resources include:

- Interceptors that can preprocess and postprocess a request
- Action classes that can call business logic and data access code
- Results that can prepare views, like JavaServer Pages and FreeMarker templates

At runtime, there is a single configuration for an application. Prior to runtime, the configuration is defined through one or more XML documents, including the default `struts.xml` document. There are several elements that can be configured, including packages, namespaces, includes, actions, results, interceptors, and exceptions.

See struts.xml for a working example.

### Administrative Elements

- Bean Configuration
- Constant Configuration
- Package Configuration
- Namespace Configuration
- Include Configuration

### Request Handling Elements

- Interceptor Configuration
- Action Configuration
- Result Configuration

### Error Handling

- Exception Configuration

## Next: Interceptors

Children Show Children Hide Children
Include Configuration (Apache Struts 2 Documentation)
Views (Apache Struts 2 Documentation)
Exception Configuration (Apache Struts 2 Documentation)
Package Configuration (Apache Struts 2 Documentation)
Result Configuration (Apache Struts 2 Documentation)
Action Configuration (Apache Struts 2 Documentation)
Namespace Configuration (Apache Struts 2 Documentation)
Interceptor Configuration (Apache Struts 2 Documentation)
Bean Configuration (Apache Struts 2 Documentation)
Constant Configuration (Apache Struts 2 Documentation)