Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Info

To deploy to WebLogic, the common approach is to create and deploy an unexpanded WAR to the WebLogic deployment directory. With WL 8.x, the deployment directory is typically at <bea_home>/user_projects/domains/mydomain/.

Adding an

...

struts-velocity.properties Configuration File

  • In the actionstruts.properties file (usually kept in the WEB-INF/classes directory), add an entry that specifies a Velocity configuation file.
    • Code Block
      titleactionstruts.properties
      actionstruts.velocity.configfile = actionstruts-velocity.properties
      
  • Create the corresponding Velocity properties file ("actionstruts-velocity.properties"), preferablly preferably in the same location as the actionstruts.properties file.
  • Copy into the Velocity properties file the contents of the velocity.properties file that is the the SAF velocity-dep.jar.
  • In your new actionstruts-velocity.properties file, find he section titled "T E M P L A T E L O A D E R S", and change this section as so:

...

  • Redeploy a fresh WAR to WebLogic.

NPE when using Struts 2 Jasper Reports plugin

When using mentioned plugin in Weblogic 11g you can get NullPointerException within Struts 2. To solve the problem you must enable the "Archived Real Path" global property in Weblogic admin console > configuration > Web Applications. It's because JasperReportsResult determines the report directory base on servletContext.getRealPath(finalLocation).

Convention based application doesn't work

When you deployed an application that base on the Convention Plugin and you get an error messages that says:

No Format

There is no Action mapped for namespace / and action name xxxxxx

create struts.properties file in WEB-INF/classes folder (in the expanded application's folder or in the source code) with below statements:

No Format

#struts convention property modifications for Weblogic
struts.convention.action.includeJars=.*?/yourwebapp.*?jar(!/)?
struts.convention.action.fileProtocols=jar,zip

Thanks to Amit who the first published solution on his blog