ianlong Posted April 20, 2007 Share Posted April 20, 2007 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 More sharing options...
Teodor Danciu Posted April 24, 2007 Share Posted April 24, 2007 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 More sharing options...
ianlong Posted April 24, 2007 Author Share Posted April 24, 2007 Hi, Thanks for the reply. Maybe I don't understand something, how would I reference them if they are not stored on disk? I'm not sure I understand what my alternative would be? Thanks,Ian Link to comment Share on other sites More sharing options...
Teodor Danciu Posted April 25, 2007 Share Posted April 25, 2007 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now