Jump to content
Changes to the Jaspersoft community edition download ×

Stream a report in a struts framework


wegnerk

Recommended Posts

Hi, i have reports with hibernate connection working fine, but there is a great framework around. So i try to explain my problem:

 

we have some projects (eclipse) (5 at least) and the reporting thing is done in one of them. But the streaming happens in another project, because it is a struts framework and the reporting is started in an action-class. Now, the hole thing is deployed to a .war-file, which is not in the reporting project. I wrote a new task in that deploy.xml, so that the .jrxml-file is copied to the running directory of the application.

But when i start tomcat and the webapplication, it doesn't find the .jrxml file there. I tried it with an absolute path, then it works, but that is not the way it should be, because the hole thing will be on a server somewhere and out of my reach. I also tried some kind of slashes (/, //, ,\), but i get the same exception FileNotFound.

 

Any ideas? i know, that this is not a direct jasper-problem, but perhaps, someone has an idea for me...

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Thanks Lucian,

 

thats also a good idea. but i found out, how to change the deploy.xml. so the report files are copied in a reports directory in the other project. And i changed a bit the way how reports are called: now, the jasper-file gets an InputStream in the action class, and that stream is delivered to my report-package.

 

but i will try it with the class-path, that would be easier perhaps ;-)

Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...