5) configure system variables
Vi/etc/profile // edit/etc/profile
Add at the end of the file:
PATH = "$ PATH:/usr/local/jakarta-tomcat/bin:/usr/local/jdk1.2.2/bin:/usr/local/jdk1.2.2/jre/bin"
JAVA_HOME =/usr/local/jdk1.2.2
Export JAVA_HOME
JRE_HOME =/usr/local/jdk1.2.2/jre
Export JRE_HOME
TOMCAT_HOME =/usr/local/jakarta-tomcat
Export TOMCAT_HOME
CLASSPATH =/usr/local/jdk1.2.2/lib:/usr/local/jdk1.2.2/jre/lib
Export CLASSPATH
6) Configure httpd. conf
Copy the tomcat. conf file to the conf directory of apache.
Cp/usr/local/jakarta-tomcat/conf/tomcat. conf/www/conf
Edit apache http. conf
Vi/www/conf/httpd. conf
Add at the end of the file:
Include/www/conf/tomcat. conf
7) start apache
Cd/www/bin
./Apachectl start
(Disable:./apachectl stop)
8) start tomcat
Cd/usr/local/jakarta-tomcat/bin
./Tomcat. sh start
(Disable use:./tomcat. sh stop)
9) test jsp
Open the browser and enter
Http: // localhost/examples
If you see the jsp and servlet directories, your apache and tomcat have been connected successfully.
You can use jsp and servlet.