tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Turner, John" <JTur...@AAS.com>
Subject RE: Serving Graphics Q
Date Thu, 20 Feb 2003 16:17:36 GMT

The application loading the images is the client's browser, not Tomcat.

Since you have Apache installed, you want your servlet to output HTML that
has an IMG tag with a SRC attribute in the Apache DocumentRoot.  The client
browser will resolve the URL (use a relative path like "images/new/some.jpg"
for portability) and make the request.  The request for the image will be
handled by Apache.

John

> -----Original Message-----
> From: kal inuganti [mailto:websphear@yahoo.com]
> Sent: Thursday, February 20, 2003 11:13 AM
> To: tomcat-user@jakarta.apache.org
> Subject: Serving Graphics Q
> 
> 
> 
> Hi All,
> 
> I have tomcat running on apache webserver on windows NT. I 
> would like to serve some graphics (.jpgs) over the web. I 
> have an access database that stores the image name and my 
> servlet uses JDBC to get the name of the image. Once I have 
> the image name, I would like to load the image on my web-page. 
> 
> I am a little confused about the actual location of the 
> images... should I put them under apache web server -  
> htdocs/images/<image> OR 
> under tomcat - webapps/ROOT/images/<image>
> 
> I understand that I am better off having the web-server serve 
> the images. But what I dont understand is the mechanism... 
> tomcat executes my servlet and will/should it be the one to 
> load the images?
> 
> Please suggest.
> 
> Thanks,
> -kalyan
> 
> 
> 
> ---------------------------------
> Do you Yahoo!?
> Yahoo! Tax Center - forms, calculators, tips, and more
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-user-help@jakarta.apache.org


Mime
View raw message