wood burning stoves 2.0*
The moose likes Struts and the fly likes Struts2 + JasperRepots: Problem with relative path! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Struts2 + JasperRepots: Problem with relative path!" Watch "Struts2 + JasperRepots: Problem with relative path!" New topic
Author

Struts2 + JasperRepots: Problem with relative path!

Peter Mest
Ranch Hand

Joined: Aug 14, 2009
Posts: 30
I'm trying to integrate Struts2 with JasperReports and I have a little problem.

I have a jrxml file which needs to be put in WEBAPP_FOLDER/jasper. In my action i need to create a jasper file based on the jrxml file from that location:

In my action file.

In struts.xml

But when I run the application, I get an exception:



I found that the place where it is looking for the jrxml is the bin folder from tomcat folder. So I copied the jasper folder(with the jrxml file too) in the bin folder from tomcat.
I hit the refresh button, but I got this problem:



Now is looking for the jasper file in the right place and not in the bin folder.

I copied the jasper file from the tomcat/bin/jasper to *D:\Projects\Hello_World_Struts2_Mvn\target\Hello_World_Struts2_Mvn\jasper* and it's working.

The question: How can I make this work as it should work?
Peter Mest
Ranch Hand

Joined: Aug 14, 2009
Posts: 30
Solved


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Struts2 + JasperRepots: Problem with relative path!