wood burning stoves*
The moose likes Meaningless Drivel and the fly likes Oracle Chart (Graphs, Charts) Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Oracle Chart (Graphs, Charts)" Watch "Oracle Chart (Graphs, Charts)" New topic
Author

Oracle Chart (Graphs, Charts)

Suvendu Mishra
Greenhorn

Joined: Jul 31, 2006
Posts: 1
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();

response.getOutputStream(t).

But when I run the program no image is getting shown.



Regards,
Suvendu K. Mishra
 
permaculture playing cards
 
subject: Oracle Chart (Graphs, Charts)
 
Similar Threads
Applet can't load gif image
Inserting Image into Oracle.
Gif image not getting rendered properly
Oracle chart builder finish but some threads are still alive ?!?!?!?
invalidkeyspecexception - PKCS8EncodedKeySpec