The line would be something like this:
<img src="/servlet/ImageServlet?image=redButton">
then you need output stream in servlet:
ServletOutputStream out = response.getOutputStream();
then the ImageServlet would need to have the content set to for example:
response.setContentType("image/gif");
write data to stream and close it.
dave.
Steve Buonincontri wrote:
> folks,
>
> I have not been able to load an image from a servlet yet. I know this is an
> old topic, but can someone please send me the HTML line embedded inside the
> servlet which makes it happen?
>
> Where does the image have to reside? What does the line of java code look
> like?
>
> out.println("<IMG
> SRC=\"http://167.14.97.54:8080/vcafe3.0/Projects/LoginApplet/toppicture.gif
> \" ...\">");
>
> Thanks.
>
> - steve
> ----------------------------------------------------------------
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential and/or privileged
> material. Any review, retransmission, dissemination or other use of, or
> taking of any action in reliance upon, this information by persons or
> entities other than the intended recipient is prohibited. If you received
> this in error, please contact the sender and delete the material from any
> computer.
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
--
David Mossakowski [EMAIL PROTECTED]
http://www.dwdog.com/styk 212.310.7275
"I don't sit idly by, I'm planning a big surprise"
F U G A Z I
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html