File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Exception with displaying image Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Exception with displaying image" Watch "Exception with displaying image" New topic
Author

Exception with displaying image

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
In our requirement we need to display the images on a JSP and these images are stored in database. I can get the image from database uwing rs.getBinaryStream() and I can see the image on the jsp page.
but I get the exceptions on server console

and on jsp I see two kinds of exception


what could be the reason? how we can avoid them?
could some one please give me solution.


Thanks,
Kumar
Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
Oh I forget to attach my servlet code

Simpson Kumar
Ranch Hand

Joined: Mar 19, 2008
Posts: 260
I got it..

My solution is don't ever use Struts while streaming images from database....

I just created a Servlet and copied the same code from Struts Action class to this Servlet and worked. I don't know what is the exact issue behind Struts action and I will find it soon. However, I got the solution thats it.


Thanks,
Sumant K
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception with displaying image
 
Similar Threads
cache refresh error in weblogic server??
java.lang.IllegalStateException: Response already committed
ERROR: Cannot forward. The response has already been committed.
java.lang.IllegalStateException in Servlet
IllegalStateException in servlet