Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Wiki Markup
||Name|PlexusPlugin|
||Author|N/A|
||Homepage|N/A|
||Version|N/A|
||Compatibility|Bundled with Struts|
||State| UnstableExperimental |
||License| Open Source (ASL2)|
||Download| N/A| 

h2. Overview

The Plexus plugin {excerpt}enables Struts Actions, Interceptors, and Results to be created and injected by [Plexus|http://plexus.codehaus.org/]{excerpt}.  

This plugin provides an [ObjectFactory|WW:ObjectFactory] implementation that tries to create Struts Action, Interceptor, and Result classes as Plexus objects.

h4. Features

* Allows Actions, Results, and Interceptors to be created and managed by Plexus

h2. Usage

To use the plugin, when configuring Struts Actions, Interceptors, or Results in {{struts.xml}}, set the {{class}} attribute to contain the Plexus object id, rather than the actual Java class.  This will allow Plexus to create the object and inject any depenencies also managed by Plexus.

h4. Example

{code|title=A simple Action using a Plexus id|lang=xml}
<action name="myAction" class="myPlexusId">
  <result>myAction.jsp</result>
</action>
{code}

h4. Settings

The following settings can be customized.  See the [developer guide|http://cwiki.apache.org/confluence/display/WW/Configuration+Files].

||Setting||Description||Default||Possible Values||
|{{struts.objectFactory}}|The name or class name of the ObjectFactory implementation to use|{{plexus}}|{{plexus}}, {{struts}}, or any class that extends {{ObjectFactory}}|

h4. Installation

This plugin can be installed by copying the plugin jar into your application's {{/WEB-INF/lib}} directory.  No other files need to be copied or created.