Name |
WebWork2 Plugin |
---|---|
Publisher |
|
License |
Open Source (ASL2) |
Version |
1.0-SNAPSHOT |
Compatibility |
Struts 2.0.9+ |
Homepage |
|
Download |
Overview
This plugin is only experimental and hasn't been released yet. It is not ready to be used in production applications.
The Struts 2 WebWork plugin aims to be a drop-in replacement for WebWork 2 in a web application. It includes the necessary wrappers and adapters to allow a WebWork 2-based application to need no code or configuration file changes to run on Struts 2.
Features
- Drop-in replacement of WebWork 2
- Includes adapter classes and interfaces of classes including Action, FilterDispatcher, and ActionSupport
- Supports
webwork.properties
andxwork.properties
- Supports JSP, Freemarker, and Velocity WebWork 2 tags
Missing Features
- Not all classes and interfaces from XWork and WebWork 2 are extended
- Tags are simple wrappers around existing Struts 2 ones
- WebWork features like the rich text editor, calendar, and continuations aren't supported
- Extra features like JasperReports need the proper Struts 2 plugin
- Sitemesh wrappers aren't provided
Usage
Setting up Dependencies
If using Maven 2, replace the WebWork 2 dependency with this plugin, so change:
<dependency> <groupId>com.opensymphony</groupId> <artifactId>webwork</artifactId> <version>2.2.6</version> </dependency>
to:
<dependency> <groupId>org.apache.struts</groupId> <artifactId>struts2-webwork2-plugin</artifactId> <version>1.0-SNAPSHOT</version> </dependency>
For other build systems, copy this plugin, Struts 2 jars, and the Struts 2 Spring plugin to your application's WEB-INF/lib
directory.
Configuring Struts FilterDispatcher
The Struts FilterDispatch needs to be configured to read the webwork xwork configuration files. This can be done by adding init-params to the filter configuration:
<filter> <filter-name>struts2</filter-name> <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class> <init-param> <param-name>config</param-name> <param-value>struts-default.xml,struts-plugin.xml,struts.xml,xwork.xml</param-value> </init-param> <init-param> <param-name>configProviders</param-name> <param-value>org.apache.struts2.webwork2.WebWorkConfigurationProvider</param-value> </init-param> </filter>
Resources
Version History
Version |
Date |
Author |
Notes |
---|