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:[EMAIL PROTECTED]]
> Sent: Thursday, February 20, 2003 11:13 AM
> To: [EMAIL PROTECTED]
> 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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to