Yang XIAO wrote:
>
> Hi, list
>
> Can anyone please tell me how to display a local image file and text/html
> together in a page on the web?
If it's a static image, just insert an image tag into the html:
response.setContentType("text/html");
PrintWriter out = response.getWriter();
out.println("<HTML><BODY><img src="http://some_url"></BODY></HTML>");
If you're creating an image dynamically, you'll have to send it using a
multipart response. Jason Hunter provides an example in Ch 6 (example 12) of
Java Servlet Programming (http://www.servlets.com/). You'll also need the
com.oreilly.servlet package from that site for example 12.
___________________________________________________________________________
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