This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
Hi, I am using oracle chart (supplied by Oracle) in our web application. The approach is simple: 1. Jsp collects the data and invokes a java class. 2. Java class then using the data builds a chart and creates an image file. 3. Then jsp shows that image file using "img" tag. I am always giving a same name to the image file. So when multiple users are accessing the page sometimes JSP is not able to show the image. Because, when one process has a lock on that image file, another process is trying to overwrite the same file. Some OS/application server error gets thrown mentioning that image can't be shown.
Is there any other solution to this problem (other than giving a unique name to the image file for each request)? ====================================================================== am thinking of the following solution but unable to use it.
Instead of creating the image, we will get the byte array from buffered image object, then send it from jsp after setting the content type to image/gif.
So, I have coded this: response.setContentType("image/gif"); byte  t = ((DataBufferByte)(myBufferedImage).getRaster().getDataBuffer()).getData();
But when I run the program no image is getting shown.
Regards, Suvendu K. Mishra
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com