Php 如何通过tomcat conector mod_jk将jsp/servlet从apache服务器重定向到tomcat

Php 如何通过tomcat conector mod_jk将jsp/servlet从apache服务器重定向到tomcat,php,apache,jsp,servlets,Php,Apache,Jsp,Servlets,好朋友们, 我是一个新手,所以这听起来可能是一个基本的或相对简单的问题。我所要做的就是:我使用JSP开发了一个小应用程序,servlet使用tomcat5.5.35将其部署在网络中的一台机器上。它工作得很好,我可以看到JSP/Servlets按预期运行。 现在我考虑用PHP开发剩下的页面,并使用Apache和tomcat连接器将PHP和JSP/servlet集成在一起 Apache版本-2.2.22 win 32 x86无ssl。Tomcat连接器-Tomcat-connectors-1.2.3

好朋友们, 我是一个新手,所以这听起来可能是一个基本的或相对简单的问题。我所要做的就是:我使用JSP开发了一个小应用程序,servlet使用tomcat5.5.35将其部署在网络中的一台机器上。它工作得很好,我可以看到JSP/Servlets按预期运行。 现在我考虑用PHP开发剩下的页面,并使用Apache和tomcat连接器将PHP和JSP/servlet集成在一起

Apache版本-2.2.22 win 32 x86无ssl。Tomcat连接器-Tomcat-connectors-1.2.36-windows-i386-httpd-2.2.x

I called a php script from PHP Directory and it got displayed as expected. 
问题陈述:Apache没有将JSP和servlet转发给tomcat

已将mod_jk.so复制到/modules

我创建了worker.properties,并将其复制到\conf目录下,内容如下

worker.list=worker1
worker.worker1.type=ajp13
worker.worker1.host=localhost
worker.worker1.port=8009
worker.worker1.lbfactor=50
worker.worker1.cachesize=10
worker.worker1.cache_timeout=600
worker.worker1.socket_keepalive=1
worker.worker1.socket_timeout=300 
将httpd.conf修改为

DocumentRoot "C:/Program Files/Apache Software Foundation/Apache2.2/htdocs"
ServerName localhost:80
<ifmodule mod_jk.c>
JkWorkersFile /etc/apache2/workers.properties
JkLogFile /var/log/apache2/mod_jk.log
 JkLogLevel DEBUG
</ifmodule>

LoadModule    jk_module  "C:/Program Files/Apache Software Foundation/Apache2.2/modules/mod_jk.so"
JkWorkersFile "C:/Program Files/Apache Software Foundation/Apache2.2/conf/workers.properties"
JkShmFile "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.shm"
JkLogFile "C:/Program Files/Apache Software Foundation/Apache2.2/logs/mod_jk.log"
JkLogLevel    debug
JkLogStampFormat "[%a %b %d %H:%M:%S %Y] "
<VirtualHost *:80>
DocumentRoot "C:/Program Files/apache-tomcat-5.5.35/webapps/automationutil"
SetEnvIf Request_URI \.php no-jk
SetEnvIf Request_URI \.cgi no-jk
JkMount  /* worker1
JkMount  /*.jsp worker1
</VirtualHost>
我在web.xml中有servlet映射,它们在tomcat中运行良好。但不确定apache为什么不能正确处理它们:(。我们也需要JSP映射吗


非常感谢并感谢任何能帮助我继续的帮助。过去几天我一直在网上搜索,但没有任何收获。

如果您得到正确答案,我将期待您的帮助……谢谢。
1:06:16 2012] [5580:3828] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/loginrelated.html' from 0 maps
[Wed May 16 21:06:16 2012] [5580:3828] [debug] jk_translate::mod_jk.c (3723): no match for /automationutil/pages/loginrelated.html found
[Wed May 16 21:06:16 2012] [5580:3828] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/loginrelated.html' from 0 maps
[Wed May 16 21:06:16 2012] [5580:3828] [debug] jk_map_to_storage::mod_jk.c (3798): no match for /automationutil/pages/loginrelated.html found
[Wed May 16 21:06:16 2012] [5580:3828] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/loginfooter.html' from 0 maps
[Wed May 16 21:06:16 2012] [5580:3828] [debug] jk_translate::mod_jk.c (3723): no match for /automationutil/pages/loginfooter.html found
[Wed May 16 21:06:16 2012] [5580:3828] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/loginfooter.html' from 0 maps
[Wed May 16 21:06:16 2012] [5580:3828] [debug] jk_map_to_storage::mod_jk.c (3798): no match for /automationutil/pages/loginfooter.html found
[Wed May 16 21:06:16 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/index_settings.jpg' from 0 maps
[Wed May 16 21:06:16 2012] [5580:4996] [debug] jk_translate::mod_jk.c (3723): no match for /automationutil/pages/index_settings.jpg found
[Wed May 16 21:06:16 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/index_settings.jpg' from 0 maps
[Wed May 16 21:06:16 2012] [5580:4996] [debug] jk_map_to_storage::mod_jk.c (3798): no match for /automationutil/pages/index_settings.jpg found
[Wed May 16 21:06:23 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/helppage.jsp' from 0 maps
[Wed May 16 21:06:23 2012] [5580:4996] [debug] jk_translate::mod_jk.c (3723): no match for /automationutil/pages/helppage.jsp found
[Wed May 16 21:06:23 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/pages/helppage.jsp' from 0 maps
[Wed May 16 21:06:23 2012] [5580:4996] [debug] jk_map_to_storage::mod_jk.c (3798): no match for /automationutil/pages/helppage.jsp found
[Wed May 16 21:06:32 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/LoginApp' from 0 maps
[Wed May 16 21:06:32 2012] [5580:4996] [debug] jk_translate::mod_jk.c (3723): no match for /automationutil/LoginApp found
[Wed May 16 21:06:32 2012] [5580:4996] [debug] map_uri_to_worker_ext::jk_uri_worker_map.c (1131): Attempting to map URI '/automationutil/LoginApp' from 0 maps
[Wed May 16 21:06:32 2012] [5580:4996] [debug] jk_map_to_storage::mod_jk.c (3798): no match for /automationutil/LoginApp found