hi guys! I wanted to know how to output binary data such as a gif image through a JSP. Thanks in advance!
SCJP 1.4<br />SCWCD 1.4
Author and all-around good cowpoke
posted 14 years ago
Basically, you can't because JSP are designed to manipulate and send text as character streams. To create and send binary data such as images, PDF files or sound files, you just have to use servlets. All you have to do is make your JSP write IMG tags having a SRC that addresses a servlet. Some folks seem to be scared of using servlets but there really is no reason to resist. Any good servlet/JSP book will have examples. Bill