• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

Error in displaying image using stream Result

 
Ranch Hand
Posts: 53
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?
Please help.

Thanks in advance!
 
She's out of the country right now, toppling an unauthorized dictatorship. Please leave a message with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic