Tomcat installation configuration under Windows 2000

Source: Internet
Author: User
Tags execution variables web services zip root directory tomcat
Window

  First, Tomcat introduction
  
Since JSP release, the introduction of a variety of JSP engine. After completing the development of GNUJSP1.0, the Apache group began to consider developing a JSP server that could provide Web services directly on Sun JSWDK, and of course supporting the servlet. In this way, Tomcat was born. Tomcat is a completely free software that anyone can download freely from the Internet. The combination of Tomcat and Apache is quite perfect.

   second, the preparation before installation
  
Before you install Tomcat, you should have Apache and JDK installed under your Win2000, and you should have a general idea of the status and interrelationships of Apache, JDK, and Tomcat in the system. If you have not installed Apache and JDK, you can refer to the use of Apache1.3.20 under Windows, installation of JDK1.3.1 under Windows.
  
Third, download the required software
  
First from the http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.2.3/bin/ Jakarta-tomcat-3.2.3.zip downloads the Jakarta-tomcat-3.2.3.zip and unzip it to a directory (we're using c://tomcat). The following directory structure is available:
  
Tomcat
|---jakarta-tomcat-3.2.3
|---bin tomcat execution script directory
|---conf tomcat configuration file
|---doc Tomcat document
|---Lib Tomcat runs the required library files (JARS)
|---Logs tomcat execution log file
|---src Tomcat source code
|---webapps Tomcat's main Web publishing directory
|---work
  
Tomcat's working directory, Tomcat puts Java files and class files from translating JSP files here
  
And then you need to go from http://jakarta.apache.org/builds/jakarta-tomcat/release/v3.1.1/bin/win32/i386/ ApacheModuleJServ.dll download ApacheModuleJserv.dll.
  
   Iv. make simple settings
  
Select "My Computer", right-click the menu, select Properties, Pop-up Dialog "System Features", select the Advanced Options page, then click "Environment Variables", you can edit the system's environment variables.
  
Tomcat_home Value: c://tomcat//jakarta-tomcat-3.2.3 (indicates tomcat root directory)
  
Java_home value: c://jdk1.3.1 (JDK installation directory)
  
Classpath value: C://jdk1.3.1//lib//tools.jar;c://tomcat//jakarta-tomcat-3.2.3//lib//servlet.jar;
  
C://tomcat//jakarta-tomcat-3.2.3//lib//webserver.jar
  
In addition, some reference books mentioned that in the Chinese system installed JDK1.3, the system registry will have problems, with Regedit open the registration form to check JavaSoft, the location of hkey_local_machine->software->javasoft->, " Java Runtime Environment "should be changed to" Java Runtime environment "," Java plug-in "should be changed to" Java Plug-in ", I installed under Win2000 did not encounter this situation, you may wish to check after the installation is complete.
  
The next step is to perform the c://tomcat//jakarta-tomcat-3.2.3//bin//startup.bat. Test to see if Tomcat is functioning properly.
  
Now, we create a helloworld.jsp file in the c://tomcat//jakarta-tomcat-3.2.3//webapps//examples//jsp directory:
  
<%@ page contentype= "text/html;charset=gb2312"%>
<HTML>
<HEAD>
<TITLE>
JSP test Page---helloworld!
</TITLE>
</HEAD>
<BODY>
<%= "helloworld! <br> World, Hello!" </BODY>
</HTML>
  
In the browser's address bar, type: http://127.0.0.1:8080/examples/jsp/HelloWorld.jsp
  
This proves that Tomcat has been able to work properly. Please note that if you type http://localhost/examples/jsp/HelloWorld.jsp, you will not be able to see this image because Tomcat is not yet in use with Apache.
  
   Five, Tomcat and Apache cooperation
  
From the above we can see that Tomcat can actually be used as a stand-alone Web server. However, there are a lot of performance gaps between Tomcat and Apache as a Web server. So, we typically use Tomcat in conjunction with Apache. Tomcat itself is a subproject of Apache, so Tomcat provides strong support for Apache.
  
First copy the ApacheModuleJserv.dll file we obtained in the third part to the modules subdirectory of the Apache installation directory, then open the http.conf file in the Conf subdirectory of the Apache installation directory with a text editor and add the following two lines to the last side:
  
LoadModule Jserv_module Modules
ApacheModuleJServ.dll
INCLUDE c://tomcat//jakarta-tomcat-3.2.3
Conf//tomcat-apache.conf
  
Restart the Apache service and perform c://tomcat//jakarta-tomcat-3.2.3//bin//startup.bat. Then type in the address bar of the browser: http://127.0.0.1:8080/examples/jsp/HelloWorld.jsp, you'll see the footage, which proves that your tomcat is perfectly integrated with Apache.



Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.