There is a problem with the development of Tomcat and the Apache server. Client side is using Wampserver this integrated software, Aapche version is 2.4.9. You want to display the JSP on Tomcat on Apache. Tomcat,jdk,apache Installation I'm not going to say much here, we're going to solve this problem directly.
Second, the processing steps |
1, first we want to go to Tomcat's official web download two server connectors
Address is http://tomcat.apache.org/download-connectors.cgi
Click Binary Releases
Select window
Choose according to the version of your machine
(The Wamp version of the customer installation is 64-bit, but the Apache version is incredibly 32-bit, no language)
Unzip the ZIP package and place the mod_jk.so dynamic link library file in the modules directory under the Apache installation directory.
2. Enter the Conf under the Tomcat folder to create the Workers.properties file and add the following:
Workers.tomcat_home= "E:\apache-tomcat-6.0.29\apache-tomcat-6.0.29\" #让mod_jk模块知道Tomcat的安装路径
Workers.java_home= "D:\jdk1.8\" #让mod_jk模块知道jdk路径
Ps=\ #当前目录
Worker.list=ajp13 #这里是关键, the name should be consistent with httpd.conf. If you change httpd.conf here, you have to change it.
worker.ajp13.port=8009 #工作端口, Tomcat's JK listener port, you can see port= "8009" in Server.xml
Worker.ajp13.host=localhost #Tomcat所在机器, if installed on a different machine than Apache, you need to set the IP
Worker.ajp13.type=ajp13 #协议类型, can't change, it's going to go wrong
Worker.ajp13.lbfactor=1 #负载平衡因子这样就可以让此文件与tomcat与jdk相关联
3. Modify the httpd.conf file in the Apache directory to add the following:
loadmodule jk_module "F :/wamp/bin/apache/apache2.4.9/modules/mod_jk.so "#指向我们的连接器
<ifmodule jk_module>
jkworkersfile" E:\apache-tomcat-6.0.29\apache-tomcat-6.0.29\conf\workers.properties "# Point to the properties file that we wrote
Jklogfile "F:\wamp\logs\mod_jk.log" #错误日志
jkmount/*.jsp ajp13
jkmount/*.do ajp13
</IFMODULE>
4. Restart our Tomcat and Apache servers
At this point we can display our JSP file under localhost.
Apache integration with Tomcat related issues