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
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!
Ashik Uzzaman Senior Member of Technical Staff, Salesforce.com, San Francisco, CA, USA.
Joined: Nov 21, 2001
hi Ashik The present settings as such are like that only.I verified and got confirmed.Anything more I can do? with regards madhu
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).]
Joined: Nov 21, 2001
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).]
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.
Customer surveys are for companies who didn't pay proper attention to begin with.