Versions Compared

Key

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

...

  • Copying the plugin jar into your application's /WEB-INF/lib directory.
  • Modify your web.xml to add the osgi configuration provider to your Struts 2 filter:
    Code Block
    langxml
    <filter>
        <filter-name>struts</filter-name>
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        <init-param>
            <param-name>packageProviders</param-name>
            <param-value>org.apache.struts2.osgi.OsgiConfigurationProvider</param-value>
        </init-param>
    </filter>
    

Building bundles with Maven

See the Maven Bundle Plugin documentation for more details.

Code Block
langxml
titleExample

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.felix</groupId>
            <artifactId>maven-bundle-plugin</artifactId>
            <extensions>true</extensions>
            <version>1.4.0</version>
            <configuration>
                <instructions>
                    <manifestLocation>META-INF</manifestLocation>
                    <Export-Package>
                      org.apache.struts2.osgi.demo
                    </Export-Package>
                    <Import-Package>
                      *,com.opensymphony.xwork2
                    </Import-Package>
                    <Bundle-Activator>
                      org.apache.struts2.osgi.StrutsActivator
                    </Bundle-Activator>
                </instructions>
            </configuration>
        </plugin>
    </plugins>
</build>

Resources

...