I am developing a web application in struts2 where I need to display image on jsp pages. Many questions have been asked in different forums but I am not be to get solution for my problem.
My application receives images in form of file through mobile application which is being developed in Titanium. I am saving the file as : which saves it as long blob. format of images png.
I am trying to retrieve it in my action class and setting it to inputStream. Here is the code for this: Entry of struts.xml file is : In jsp I am calling the action as:I am able to retrieve the image from database and save in /images under webcontent but not able to display using stream. It says: The image ",......" cannot be displayed because it contains error. I am not getting any exception in log files. In stdout I am getting this: I am not able to understand why image is not being able to displayed? Is it because of length?If so how can I get contentLength for inputStream?
Thanks in advance!
SCJP 5.0 -- 97%
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads