Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Streaming image data into JSP

Posts: 2
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

From past few days I am stuck with the issue with dispalying image in JSP page retrieved from database in struts. I reffered previous post in the form and came to know that image streaming has to done through a servlet which sets the response type to "imag/gif" and writes the byte array to output stream. I followed the same approch as below.

In jsp page I am calling action class imageSign as follows

In struts-config.xml I have following entry for the same servlet

and execute method in servlet class is as below

where buye array of image is stored in session.

But when I run the code in debug mode I observed that, control is not coming inside servlet and no image is getting displayed.

Please suggest where I went wrong and also I would like to know is it the right appoch to achieve the task. Thanks in advance.
Thilak Raj
Posts: 2
Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just to correct, I am using following method to call imageSign servlet in JSP

< img src="" />

It was not printed properly in above post.

Message for you sir! I think it is a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
    Bookmark Topic Watch Topic
  • New Topic