Re: URGENT How to upload images using struts?
Sunday, December 8, 2002 02:37 AM
1. Create a JSP page or servlet that can stream out the binary data of the image as well as the proper HTTP header for the mime-type of the image (like "Content-type:image/gif") so the browser knows how to interpret the data stream.
2. on the page you want to view the image, refer to the servlet jsp in an img tag.
You cannot put the html content AND the code that streams in the images on the same page.