The apache can connect to tomcat now.
When I run
http://localhost/examples/servlet/MyHelloWorld, it works now.
I did not setup Virtualhost. However, I have many users like localhost/~userA.
I tried to add JkMount /*.jsp ajp13, JkMount /servlet/* ajp13 to httpd.conf in-between <Directory /home/*/html> </Directory>.
However, the apache cannot be started because they cannot be added in-between <Directory>.
I also tried to add <Host name="localhost/~userA">
<Context path="" docBase"/home/userA/html" /></Host> to server.xml.
But, it still did not work.
So, how should I configure httpd.conf and server.xml or other files in order to make it work?
And advice?