Hi, There is a problem occurred when I tried to make Tomcat and Apache work together. I have both Tomcat and Apache installed on my desktop, an additional helper software(Jakarta Tomcat connecter) is also installed which connects Apache with Tomcat. When there is a static html page, apache handles it, and when there is a JSP page apache passes it over to Tomcat.
When I use port 80(Apache): It works perfectly when it processes JSP pages, but it just can not process servlets.
This is the configuration I added to Apache httpd.conf
anybody could possibly tell me why? or should I change line:JkMount /servlet/* ajp13 to something else?
Why bother? Save yourself a ton of headaches and just let Tomcat serve everything.
Is there a reason you want to use Apache?
well, for solely test purpose , it is true that only Tomcat is sufficient. but don't most of ISP providers use Apache+Tomcat on their servers? If they do, why not we, My question is that is it worth to do it?
Originally posted by Yichuan Wang: My question is that is it worth to do it?
It used to be. The earlier versions of Tomcat were not optimized for performance.
In the last few years enhancements in both Tomcat and the JVMs on which they run have improved so much that, depending on what your app does, running Tomcat as a standalone may actually be faster than connecting it to an external webserver.
Very recently, Tomcat has gained the ability to run with the Apache Portable Runtime libraries (APR) The APR is the core of the Apache Web Server, is written in C and can take advantage of things like kernel level file serving and kernel level socket handling.
My advice, try running with a standalone version of Tomcat. If your app is suffering from performance problems look into all of the available means to improve it, including APR and running Tomcat behind and external web server.
Often, Tomcat's static file handling or SSL handling won't be your biggest bottleneck so adding and maintaining an external web server, and the connector (with all of its headaches) will gain you nothing. The cost of installing, configuring, and maintaining it may be more than what it would cost to improve your hardware or pay for a better network connection.
Also... If you find a book or article on the web that advocates running Tomcat behind an external web server, check the date carefully. The arguments may have been very valid at the time that it was written.