Saturday, March 14, 2009

Getting Struts 2.1 to work in Weblogic 10.3 - (contd)

Updates to struts2 convention plugin as well as XWork have been committed by Musachy Barraso based on my observations to help fix Struts2 for Weblogic 10.3. I would suggest you use them. You will need to take the source code for the following classes from the trunk of their src repository:

  • com.opensymphony.xwork2.util.finder.ClassFinder (xwork trunk)

  • com.opensymphony.xwork2.util.UrlUtil (xwork trunk)

  • com.opensymphony.xwork2.util.ClassLoaderUtil (xwork trunk)
    (Based on http://jira.opensymphony.com/browse/XW-672)

  • org.apache.struts2.convention.PackageBasedActionConfigBuilder (Struts2-struts2-convention-plugin trunk)

XWork trunk(http://svn.opensymphony.com/svn/xwork/trunk)
Struts2 convention plugin(http://svn.apache.org/repos/asf/struts/struts2/trunk)


Compile xwork first, install it into your local maven repository before compiling Struts2 convention plugin. The changes checked in will work in Struts 2.1.6 and xwork 2.1.2. While the changes will be present in subsequent versions of Struts2, there are other changes I am looking into for subsequent versions.

Please note here that you will still need to zip the action classes into a jar (that contains a META-INF/Manifest or META-INF/somefile) for the convention plugin to pick up your action classes.

Let me know if you have issues.

- Amit