> What I want is for the whole lot, images and all, to be sent on the one
> connection. But how do I know the image size of the images in the tags?
That's not how HTTP works. Keep-alive means that you don't need a new
TCP/IP connection for every image in the page, but there will be a round
trip to your server for every image no matter what (modulo caching). So
the content length you send is the actual length of the page, not the
size of everything it might include.
Rod McChesney, Korobra
John Moore wrote:
>
> I know this question has come up once or twice before, but I'm still not
> really quite sure what the correct answer is. I am running WebSphere with
> IIS, and I want my servlets to use persistent connections. Apparently the
> way to do this is to send a "Content-Length" header, which sort of makes
> sense, because then the client will know there are n bytes to come. What
> puzzles me, though, is how I am supposed to know this content length. Let's
> say my servlet generates a page like the following:
>
> <HTML>
> <BODY>
> Hello, I'm a page!
> <IMG SRC="/images/first.img">
> <IMG SRC="http://www.MyDomain.com/images/second.img>
> </BODY>
> </HTML>
>
> What I want is for the whole lot, images and all, to be sent on the one
> connection. But how do I know the image size of the images in the tags? Or
> do I even need to? And does it make a difference whether these images are
> on the local web server (referenced by a relative URL), or somewhere else
> (referenced by an absolute URL)?
>
> John
> ==================================================
> John Moore ~ Norwich, UK ~ [EMAIL PROTECTED]
> ==================================================
>
> ___________________________________________________________________________
> 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