1.tomcat Introduction
Since JSP was released, a variety of JSP engines have been introduced. After completing the development of GNUJSP1.0, Apache Group began to consider developing a JSP server that could provide Web services directly on the Sun's JSWDK basis, while also supporting Servlets, so that Tomcat was born. Tomcat is an important subproject in the Jakarta project, which was selected by editors of Javaworld Magazine as the most innovative Java product of the 2001, and it is also the official recommended servlet and JSP container for sun. As a result, it is becoming more and more popular with software companies and developers. The latest specifications for Servlets and JSPs can be implemented in a new version of Tomcat. Second, Tomcat is completely free software that anyone can download freely from the Internet. The combination of Tomcat and Apache is quite perfect.
2. Tomcat Directory
Tomcat
|---bin Tomcat: Store startup and shutdown Tomcat scripts;
|---conftomcat: Store different configuration files (server.xml and Web. xml);
|---Doc: storing tomcat documents;
|---Lib/japser/common: the library file (JARS) that is required to store Tomcat operations;
|---Logs: storing the log file for Tomcat execution;
|---src: The source code that holds tomcat;
|---webapps:tomcat's main Web publishing directory (including application examples);
|---Work: Store the class file generated by the JSP after compiling;
3.tomcat Project Deployment
Installing the Java environment, installing the JDK environment [[email protected] ~]# yum-y install JAVA-1.8.0-OPENJDK java-1.8.0-openjdk-devel[[email protected] ~]# java-version//download tomcat[[email protected] ~]# cd/usr/src/[[email protected] src]# wget https://archive.apache.org/dist/tomcat/tomcat-9/v9.0.8/bin/apache-tomcat-9.0.8.tar.gz//Decompression Deployment [[email Protected] src]# tar XF apache-tomcat-9.0.8.tar.gz-c/usr/local/[[email protected] src]# cd/usr/local/[[email& Nbsp;protected] local]# ln-s apache-tomcat-9.0.8/tomcat[[email protected] local]# ll//Write a Java page of Hello World [[ Email protected] ~]# vim index.jsp[[email protected] ~]# cat index.jsp
Browse the Web on your browser
Input: 192.168.209.12:8080
Input: 192.168.209.12:8080/test/
Deploying Tomcat in Linux