Java Web Server Configuration

Source: Internet
Author: User
Step 1: Download j2sdk and tomcat:

Step 2: install and configure your j2sdk and tomcat: Execute the j2sdk and tomcat installation programs and install them according to the default settings.

1. after installing j2sdk, You need to configure the environment variables, choose my computer> Properties> advanced> environment variables> system variables to add the following environment variables (assuming your j2sdk is installed in C: "j2sdk1.5.0 ):

Java_home = C: "Program Files" Java "jdk1.5.0 _ 06

Classpath =.; % java_home % "lib" DT. jar; % java_home % "lib" tools. jar; (.; must not be less, because it represents the current path)

Path = % java_home % "bin

2. after Tomcat is installed, add the following environment variables to my computer> Properties> advanced> environment variables> system variables (assuming that your Tomcat is installed in C: "Tomcat ):

Catalina_home = C: "Program Files" Apache Software Foundation "Tomcat 5.0 catalina_base = C:" Program Files "Apache Software Foundation" Tomcat 5.0

Modify the classpath in the environment variable, and append servlet. Jar under common "Lib in the Tomat installation directory to the classpath. The modified classpath is as follows:

Classpath =.; % java_home % "lib" DT. jar; % java_home % "lib" tools. jar; % catalina_home % "common" lib "servlet. jar;

Start Tomcat and access http: // localhost: 8080 in IE. If you see the welcome page of Tomcat, the installation is successful.

Environment configuration experience

First of all, we can use JDK + Tomcat to configure our JSP server. We don't need anything. Many articles have introduced Apache, but we don't need it at all, general learning and debugging of Tomcat is fully qualified.

After JDK is installed, Tomcat will automatically find the JDK installation path before installation, and click "Next" all the way. After a period of file copying, and finally "close", complete comcat installation.

You 'd better download a tomcat version with a higher version, such as 4.1 or above, because it does not need to set too many system variables, right-click "my computer ", select "property"-> "advanced"-> "environment variable"-> "system variable" to create a tomcat_home, and set the value to the path of your tomcat, for example, C: "Program Files" Apache Software Foundation "Tomcat 5.0

Problem: After the configuration is complete, enter http: // localhost: 8080 In the IE Address Bar and the test fails. It may be because port 8080 is occupied. Open C: "Program Files" Apache Software Foundation "Tomcat 5.0" conf directory,

<Connector Port ="8080"Maxthreads ="150"Minsparethreads ="25"Maxsparethreads ="75"Enablelookups ="False"Redirectport ="8443"Acceptcount ="100"DEBUG ="0"Connectiontimeout ="20000"Disableuploadtimeout ="True"/>

Change the Tomcat port to the unused port. You can try port 8081 or port 8000.

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.