Thank you Craig:
I don't need to generate the gif file dynamically, but want to provide a URL to
upload the image. All of this is a new to me so please forgive the simplicity of
the question! I've tried the following without success:
<IMG SRC="http://CS391674-A:8080/public_html/images/mypic.gif">
<IMG SRC="http://CS391674-A:8080/images/mypic.gif">
<IMG SRC="/images/mypic.gif" WIDTH=600 HEIGHT=120>
"CS391674-A" is my computer name, and I did put the mypic.gif in the following
directory: c:\JavaWebServer1.1.3\public_html\images
The JWS was done using default installation.
Your feedbacks are always appreciated...
Jean
"Craig R. McClanahan" wrote:
> Jean Bresse wrote:
>
> > I was wondering about one thing about web page generation by a servlet.
> > Say that you have a web page which contains a picture, or a background
> > motif. Do you need a second servlet to service the picture itself?
> >
> > There are 2 reasons why I ask this:
> >
> > 1) With the code I wrote, I'm not able to do it using one servlet only
> > 2) I know that the context of the servlet is set to "text / html". I'm
> > only guessing here that the image is of a different context
> >
> > Your kind and informative feedbacks on this are MOST appreciated...
> >
> > Thanks,
> >
> > Jean
> >
>
> When you use something like <img src="myimage.gif"> in your generated page,
> the image is requested by the brower in a separate HTTP request from the one
> that requested this page. If your image is static, you could just set the URL
> of the image to point at a web server to get it, or (if your servlet engine
> serves files as well) just let the servlet engine serve it. On the other
> hand, if you need to dynamically create the image (say, you were graphing some
> data that was dynamically selected from a database) you might want to have a
> servlet create it. The key is whatever the image URL points at.
>
> Craig
>
> ___________________________________________________________________________
> 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
___________________________________________________________________________
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