1

I'm using Jasper with the Struts2 plugin to generate PDF reports for my web application, as described in this tutorial. The application uses Weblogic as app server and Apache as webserver in development environment, IIS in testing and production environments. Locally I put the .jasper files under WEB-INF of the WAR section, which is then put in a EAR after compilation.

PDF generation works locally, passing a relative path (namely WEB-INF/jasper/template.jasper) to the result parameters of the "jasper" result in struts.xml . This does not work when the application is deployed as an EAR.

How can I get my application to find the .jasper template even when deployed as an EAR? I tried to pass in an absolute path pointing to a directory in the same server the EAR is in, but it doesn't work.

And by the way, is there a comprehensive guide to the Struts2 plugin for Jasper? I couldn't find anything except for that tutorial.

Alessandro
  • 601
  • 3
  • 11
  • 26
  • 2
    At present, no great way to do this. The `location` attribute is expected to be a physical file relative to the web app. The way the plugin is currently coded makes it a bit painful to work around that limitation, too, it's somewhat embedded in a too-large (~125 LOC) method. I'll put it on my pile of things to do. – Dave Newton Nov 22 '11 at 17:54

1 Answers1

0

In weblogic domain home's webapplications tab; enable the option called Archived Real Path Enabled

works for me in weblogic 11g or later versions

Hashbrown
  • 12,091
  • 8
  • 72
  • 95
chanuka
  • 39
  • 1
  • 6