Jump to content
Changes to the Jaspersoft community edition download ×

Jasper Reports in a web app question


ianlong

Recommended Posts

Hi All,

 

No, it's not the typical question :)

 

I have jasper reports integrated into my jsf/facelets application to generate reports. Some of my reports contain charts, and I have jasper reports configured to save the images so that I can reference them externally.

 

Since jasper reports always seems to use img_0_0_2 for the filename, I have been using the session id as a directory name so that it works correctly for multiple users who may generate different reports at the same time.

 

Are there any rules of thumb for doing this kind of thing? Ie, configuring jasper reports to generate a random filename? Other suggestions?

 

I should mention I'm just using jasper to generate raw html which I then include in my pages generated with facelets; I'm not using servlets, etc.

 

Any help/comments would be appreciated.

 

Thanks,

Ian

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Hi,

 

In normal scenarios, having images with the same name for concurrently generated reports is not a problem since they are isolated on different HTTP sessions.

But if you still think you need to put these images on disk, then what you did with the session id directory name is probably the only reasonable way to do it.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

Hi,

 

It turns out this is indeed a typical question for which the answer is: look into the /demo/samples/webapp sample provided with the project source files.

You'll see there an ImageServlet that would deliver images on-the-fly, without anything saved on disk.

 

I hope this helps.

Teodor

Link to comment
Share on other sites

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...