Jsp is a new web development tool developed by sun Based on servlet, foreign Ejb + jsp/servlet + Application Server + data library has become a popular architecture for e-commerce sites. Tomcat3.1 implements the latest servlet2.2 and jsp1.1 standards, and sun also recommends tomcat. This article introduces the installation of tomcat3.1 under RedHat.
Get jdk1_2_2-linux-i386.tar.gz in java.sun.com.
In begin,
In
1. Install jdk1.2.2 # cp jdk1_2_2-linux-i386.tar.gz/usr/local # tar xvzf jdk1_2_2-linux-i386.tar.gz # ln-s jdk1.2.2 jdk # ln-s jdk/jre set $ JAVA_HOME, $ CLASSPATH # vi/etc/profile: JAVA_HOME =/usr/local/jdk export JAVA_HOME CLASSPATH =/usr/local/jdk/lib: /usr/local/jre/lib export classpath path = $ PAHT:/usr/local/jdk/bin:/usr/local/jre/bin
2. install tomcat # cp jakarta-tomcat.tar.gz/usr/local # tar xvzf jakarta-tomcat.tar.gz and log out again # cd/usr/local/jakarta-tomcat/bin run tomcat server #. /startup. sh start (. /shutdown. sh stop ends tomcat server) # lynx http: // localhost: 8080/saw jsp/servlet and can run its example program, then your tomcat server is successfully installed.
3. Connecting to tomcat with apache is actually a web server. We can connect it to other web servers such as apache. These two servers can be different from the same machine. The operation is performed on the same machine. If you want to separate the two computers, modify/usr/loca/jakarta-tomcat/conf/tomcat. conf # cp mod_jserv.so/your/apache/libexec # cp/usr/local/jakarta-tomcat/conf/tomcat. conf/your/apache/conf/path # vi/your/apache/conf/path/httpd. add Include/your/apache/conf/path/httpd/tomcat to conf. conf
4. Test and restart your apache, and then run the tomcat server # lynx http: // localhost/examples/. If you see the jsp and servlet directories, your apche and tomcat have been connected successfully.
5. Some Notes: If your jsp/servlet cannot run or has errors, your CLASSPATH settings are incorrect. If your apache is compiled by yourself, enable -- enable-module = so when compiling apache.
For information about tomcat please go to http://jakarta.apache.org
Other jsp information can go to the http://java.sun.com/jsp