aspose file tools*
The moose likes Struts and the fly likes S2: how to show the image on the JSP page -using inputStream / bytes[] Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "S2: how to show the image on the JSP page -using inputStream / bytes[]" Watch "S2: how to show the image on the JSP page -using inputStream / bytes[]" New topic
Author

S2: how to show the image on the JSP page -using inputStream / bytes[]

Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
Hi all,

I would like to know what should be the JSP code to present an image. The image comes as a inputStream data (or bytes[]) from a BLOB

my action looks like this:



Thank you!
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

Here the class that I use for streaming in one project. (Ignore the extended class TiltoBase...)


Should be pretty self-explanatory with the JavaDocs.
Peter Primrose
Ranch Hand

Joined: Sep 10, 2004
Posts: 755
thanks, what would you put in the JSP page?
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Read the Javadocs of the code that was posted.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: S2: how to show the image on the JSP page -using inputStream / bytes[]