Versions Compared

Key

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

...

Warning

Keep in mind that the interceptor is not defined in the default struts package, so when using Convention, you need to specify the parent package as "osgi-default", either using annotations (@ParentPackage), or XML(this XML fragment must be in the struts XML config file in the application, not the bundle's, this is a current limitation of the OSGi plugin):

Code Block
xml
xml
<constant name="struts.convention.default.parent.package" value="osgi-default" />

Admin bundle

An admin bundle is distributed with struts, which provides a simple interface to list the installed bundles. Using this interface the bundles can be stopped, started and updated (reloaded from the file system). This interface also provides information on the installed bundles, like OSGi metadata, and a list of packages and actions loaded from each bundle. An interactive AJAX shell is also available, which is just a web interface to the Apache Felix Shell. To use this bundle, just copy the jar file to /bundles (same place where the application bundles are installed) and open http://localhost:PORT/CONTEXT/osgi/admin/Image Added (replace PORT and context)

About stopping/starting bundles

When a bundle is started, the OSGi plugin will check for the header Struts2-Enabled in it. If it is set to "true", the bundle will be scanned for XML config and Convention config. When a bundle is stopped, any actions that were loaded from it will be removed from the runtime configuration.

Settings

The following settings can be customized. See the developer guide.

...