• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Apache Not able to get html files & GIF files placed in the Tomcat

 
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have connected Apache 1.3.22 with Tomcat4.0. Apache is configured to listen
at port 80 and Tomcat at 8080(the HttpConnector is working fine both for static
and dynamic ,when Tomcat used as standalone) and port 8008(WarpConnector). and I am able to
get a page from a servlet of Tomcat, hopefully through Apache( i.e. when I call
http://localhost/examples/HelloWorldExample or http://localhost:80/examples/HelloWorldExample.
I get html response written by the servlet in Tomcat).But, the gifs in the Tomcat associated
with the above response are NOT displayed.In a nutshell , Apache is able to fetch servlet response from Tomcat
but NOT any .gif files from Tomcat.But the same works(gifs displayed) fine when I
use http://localhost:8080/examples/HelloWorldExample(Tomact StandAlone).
Secondly, I am Not able to get html files placed in the Tomcat(under web-app directory).
Pl.tell me ,what to do??
Thirdly, what I want to do is Make Apache serve the static and Tomcat servlets and jsp.
I have configured httpd.conf of Apache w.r.t. tomcat .Tomcat's server.xml
is NOT modified after installing Apache.
Can anybody help,
with regards
madhu
 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What OS are you running this in? I'm presently having a similar problem running under NT server...
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ciano,
I am using WindowsNT4.0 (SP4).So what to do?
regards
madhu
 
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi madhu, try to store ur images in examples/images directory of and access them by <img src = "/examples/images/somepic.gif"> by ur HTML pages or servlets.
------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi Ashik
The present settings as such are like that only.I verified and
got confirmed.Anything more I can do?
with regards
madhu
 
Ashik Uzzaman
Ranch Hand
Posts: 2379
MySQL Database Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Madhu, i access my servlet thru /examples/servlet/ServletName but u access only thru /examples/ServletName in Tomcat 4,0,1. So u r using webapps/examples/classess directory to store servlets while i m using webapps/examples/web-inf/classes as i frequently change servlets. So u can try my style first to test the servlers and images for temporary testing/storing....

------------------
Muhammad Ashikuzzaman (Fahim)
Sun Certified Programmer for the Java� 2 Platform
--When you learn something, learn it by heart!
[This message has been edited by Ashik uzzaman (edited December 20, 2001).]
 
madhu gun
Greenhorn
Posts: 25
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ashik,
Can u please confirm what u are saying!Becoz,I access my servlets thru /examples/ServletName only, while I am using webapps/examples/web-inf/classes directory only, to store servlets, NOT
webapps/examples/classes .I dont think/know that we can store servlets under webapps/examples/classes. (I am using Tomcat4.0.).I have the following lines in Apache server's httpd.conf file at the end.
LoadModule webapp_module modules/mod_webapp.so
AddModule mod_webapp.c
WebAppConnection warpConnection warp localhost:8008
#DocumentRoot /wsf
<VirtualHost localhost>
#DocumentRoot webapps/examples
ServerName localhost
#WebAppDeploy takes three arguments, <name> <connection> <uri-path>
WebAppDeploy examples warpConnection /examples
WebAppInfo /webapp-info
</VirtualHost>
#include C:/Program Files/Apache Tomcat 4.0/conf/tomcat.conf
#put path in double quotes.But Apache here works with only conf files.Not xml.
#include "C:/Program Files/Apache Tomcat 4.0/conf/server.xml"
with regards
madhu
[This message has been edited by madhu gun (edited December 20, 2001).]
[This message has been edited by madhu gun (edited December 20, 2001).]
[This message has been edited by madhu gun (edited December 21, 2001).]
 
Saloon Keeper
Posts: 27764
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Actually, you really shouldn't even be TRYING to get Tomcat to serve the GIFs! Unless you expect people to access TOmcat directly as well as via Apache, it's more efficient AND simpler to have Apache serve them!
It's not a bad idea to put all the images in an apache-addressable directory and use the Apache Alias directory to reach them.
Remember, nobody ever said every item on a web page has to come from the same server (or even the same domain!). If it were otherwise, Akamai and DoubleClick would have gone out of business.
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic