Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Struts2 + JasperRepots: Problem with relative path!

 
Peter Mest
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Solved


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic