tomcat5.5.4 from installation to configuration

Source: Internet
Author: User
Tags add auth sql version window access port number apache tomcat

First, install tomcat

tomcat5.5.4 requires the installation of a jdk1.5 version or a later version.

1. Install JDK1.5

1.1. Run jdk installer jdk-1_5_0-windows-i586.exe(download from the JDK official web site)

1.2.        Protocol

Select "I accept the terms in the license Agreement", click "Next";

1.3. Select installation Components

Select Development Toolsin the selection area of the middle of the interface and click "Change..." button to change the installation directory, then click "next" to go to the next step;

1.4. Installation

The installer is running, and when the installation component is complete, another window pops up and other components can be installed;

1.5. Install j2se Runtime Environment

Select J2SE Runtime Environmentin the selection area of the middle of the interface and click "Change..." button to change the installation directory, then click "next" to go to the next step;

1.6. Browser Registration

Select the browser to register the Java plug-in, select the checkbox in front of "mincrosoft Internet Explorer" and click "next" to go to the next step;

1.7. Complete Installation

Click "Finish" to complete the JDK1.5 installation.

2. Install tomcat5.5.4

2.1. Run the tomcat5.5.4 installation file Jakarta-tomcat-5.5.4.exe;

Click "next" to enter the next step;

2.2. Agreement

Click "I Agree" to enter the next step;

2.3. Select installation Components

Select "Start menu Items" under "Normal" and click "next" to enter the next step;

2.4. Select installation directory

Click "Browse ..." Can change the installation directory, click "next" to enter the next step;

2.5. Configuration

Enter the port number and Administrator login username and password, click "next" to enter the next step;

2.6. Select JDK installation directory

Click "..." button to select the JDK installation directory, click "next" to go to the next step;

2.7. Installation

Installing, click Show Detailsto view installation detail. When the installation is complete, eject the completion window.

2.8. Complete

Click Finishto complete the installation. If you select the check box in front ofRun Apache Tomcat, start tomcatafter the installation completes, and if you select ShowReadme, restart the Tomcat when the installation is complete Readme file.

after installation, in IE access: http://localhost:8090 , if the normal display of the following interface, the installation is successful; otherwise, in Tomcat In the log folder under the installation directory, look at the logfile Stdout.logto find the cause of the error.

Note: The following <tomcat-home> indicates the installation directory for Tomcat .

second, deployment applications

1 . Copy the application folder to the <tomcat-home>/webapps folder, and the name of the folder is the name of the virtual directory of the application; For example, if you set up an application in < Tomcat-home>/webapps folder under the ABC folder, the address of the application is accessed in the browser as http://localhost:8090/abc

2 , a driver for the database connection pool that the application requires, such as Classes12.jar,commons-collections.jar, Commons-dbcp.jar,commons-logging.jar,commons-pool.jar, etc. copy to <tomcat-home> \common\lib , such as:D:\Program files\apache Software foundation\tomcat5.5\common\lib;

3, the new file in the <tomcat-home>/conf\catalina\localhost directory abc.xml, this file is used to configure the ABC application use of the database connection pool , the contents of which are as follows:

<context path= "/abc" docbase= "/abc" debug= "5" reloadable= "true" crosscontext= "true" >

<resource name= "The database connection pool you specified" auth= "Container" type= "Javax.sql.DataSource"

Username= "The database user name you specified" password= "The database password you specified" driverclassname= "Oracle.jdbc.driver.OracleDriver"

Url= "jdbc:oracle:thin:@ the database IP address or host name you specified: 1521:pkuoa"

Maxactive= "maxidle=" 3 "maxwait="-1 "

Removeabandoned= "true" removeabandonedtimeout= "a" logabandoned= "true"/>

</Context>

4, solve the Chinese coding problem

Modify the <tomcat-home>\conf\server.xml file, find the HTTP corresponding connector block, add the following: Uriencoding= "UTF-8".

Note: UTF-8 is a coded format used by ABC applications.

5, solve the path is not found the XML parser problem

Configure Classpath, as follows:

Open Tomcat monitorand switch to the Java page as shown in the following illustration:

In the classpath column, add the following:

C:\ Abcconfig; C:\Program Files\java\jdk1.5.0\jre\lib\crimson.jar;

Among them,C:\ Abcconfig is the directory where the configuration file is stored;C:\Program Files\java\jdk1.5.0\jre\lib\crimson.jar is the XML parser that is required Crimson.jar the path to the file.

6 . Modify the configuration in the confirmation application

a) under the Web-inf folder web.xml

I. confirmation that there is no debugjsp information in the document;

II. The confirmation file contains the following information: (Metabase connection usage)

<resource-ref>

<description>db connection</description>

<res-ref-name> The database connection pool you specified </res-ref-name>

<res-type>javax.sql.DataSource</res-type>

<res-auth>Container</res-auth>

</resource-ref>

Third, FAQ

1, Some machines can not access the local service through http://172.0.0.1:8080 , in this case, through the http://localhost:8080 to visit.

2 . If there are other Web services running on the Tomcat server, it is recommended that you do not rashly specify 8080 as http when you install tomcat Port, it is easy to conflict with other web services; It is recommended that you specify a port number that will normally not conflict with other Web services as Tomcat .

3 . When installing Tomcat , do not install Tomcat under a path that contains spaces, otherwise when the path is very long and there are spaces in the path, there is a problem loading the DLL needed for decryption. If it is already installed, the solution: Place the configuration file and decryption requires config in a short path without spaces and add the path to Java path via the tomcat5.5 Monitor console.

4. If the application uses its own XML parser, it needs to use its own XML parser, such as Crimson.jar files, copied to the jdk1.5 installation directory under the JRE directory under the Lib directory, such as:C:\Program files\java\ Jdk1.5.0\jre\lib;



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.