With the appearance of the Catalina Servlet engine, Tomcat's fourth edition has been improved, making it a servlet / JSP container worth considering. However, you can help you start to learn about Tomcat's file resources, only few books, and
Some information on the Jakarta website is not very clear.
Let's learn about Tomcat's installation process step by step, and then discuss the use of some Tomcat 4 / JSP features to construct web applications.
What is Tomcat?
Tomcat is an open source, running a Java-based web application container for Servlet and JSP web applications. Tomcat is supported by Apache-Jakarta subprojects and maintained by volunteers from an open source Java community. Tomcat Server is performed according to the Servlet and JSP specification, so we can say that Tomcat Server has also implemented Apache-Jakarta specifications and better than most commercial application software servers.
Install Tomcat 4
To start using Tomcat 4, you should at least download the Java Development Kit (JDK) version 1.2 and Tomcat 4 installation packages, which are ZIP files and Windows installation packets, respectively. Once you have installed these two packets, you have to join two environment variables: java_home and tomcat_home. JDK will be installed in the java_home directory, while Tomcat 4 will be installed in the Tomcat_home directory.
If you are installed by a Windows installer, you can use the menu option to launch Tomcat, or open a command prompt window, enter the tomcat_home / bin directory, run the Startup.bat / SH file. Then open a browser and enter the URL http: // localhost: 8080. The default Tomcat page will appear in front of you.
Web application software primary reading
Before we start, let's review the parts included in a web application. The Java Servlet specification defines the web application as a collection of resources bundled and run on multiple containers from multiple marketers. In Tomcat, these resources are placed in a special directory structure below the Tomcat_Home / WebApps folder. This directory structure will be like this for a sample (myApp) for a web application.
Tomcat_Home / WebApps / MyApp / Web-INF / CLASSES / LIB
MyApp directory is considered to be the root directory of web applications, all JSP, HTML, JavaScript files and other resources are located under this directory. The web-INF directory contains the resources used by the application, but web-infers are not in the public document root directory. The files included in this directory cannot be accessed by the client. In the Category (under Web-INF), the servlets, beans, and effects required to run MYAPP. In some instances (log4j), the properties file is placed in the catalog of the class. Lib Directory (under Web-INF) contains Java Archive Files (Jars), such as a JDBC drive or tag library, which is myApp. If a class appears in the JAR file and in the class directory, the class loader loads the one in the class directory.