File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
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
JavaRanch » Java Forums » Other » Meaningless Drivel
Bookmark "Oracle Chart (Graphs, Charts)" Watch "Oracle Chart (Graphs, Charts)" New topic

Oracle Chart (Graphs, Charts)

Suvendu Mishra

Joined: Jul 31, 2006
Posts: 1
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:
byte [] t =


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

Suvendu K. Mishra
subject: Oracle Chart (Graphs, Charts)
It's not a secret anymore!