Win a copy of Emmy in the Key of Code this week in the General Computing forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • Devaka Cooray
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Ron McLeod
  • Carey Brown
Bartenders:
  • Paweł Baczyński
  • Piet Souris
  • Vijitha Kumara

Struts2 + JasperRepots: Problem with relative path!

 
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


 
look! it's a bird! it's a plane! It's .... a teeny tiny ad
Java file APIs (DOC, XLS, PDF, and many more)
https://products.aspose.com/total/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!