[Web development] Web Development Environment Construction

Source: Internet
Author: User

For Java Web development, you must first install JDK. After JDK is installed, you must configure environment variables:

1. Download JDK (http://java.sun.com/javase/downloads/index.jsp), the version I downloaded is: jdk-6u14-windows-i586.exe

2. Install jdk-6u14-windows-i586.exe

3. Configure environment variables: Right-click "my computer" --> "advanced" --> "environment variables"

1) create a java_home variable in the system variable. The variable value is c: \ Program Files \ Java \ jdk1.6.0 _ 14 (set it according to your installation path)

2) create a classpath variable with the variable value:.; % java_home % \ Lib \ tools. Jar

3) Add the variable value % java_home % \ bin; % java_home % \ JRE \ bin in the PATH variable (no need to create a new variable) (note that the variable values are separated)

4. "Start" --> "run" --> enter "javac" --> "enter". If the command is printed properly, the configuration is successful!

Analysis of supplemental environment variables:

Java_home: JDK installation path

Classpath: the class path loaded by Java. Only the Java commands of the class in classpath can be identified. A "." is added before the path to indicate the current path.

Path: The system can recognize Java and javac commands in any path.

 

Download and install eclipse

1. Download eclipse
IDE for Java EE developers

Web: http://www.eclipse.org/downloads/

2. Unzip the downloaded package.


Tomcat installation and configuration

1. Download URL: http://tomcat.apache.org/

2. decompress the downloaded package.

3. Add tomcat to Environment Variables

Variable name: catalina_home
Variable value: D: \ Program Files \ Tomcat
Add the PATH value of Tomcat to classpath:
Variable name: classpath
Variable value :.; % java_home % \ Lib \ DT. jar; % java_home % \ Lib \ tool. jar; % java_home % \ Lib \ tools. jar; % catalina_home % \ common \ Lib \ servlet-api.jar; % catalina_home % \ common \ Lib \ jsp-api.jar

4. start Tomcat and test whether the installation is successful: http: // localhost: 8080

PS:

Port Number modification: D: \ Program Files \ Tomcat \ conf \ Server. xml

    <Connector port="8080" protocol="HTTP/1.1"                connectionTimeout="20000"                redirectPort="8443" />

Change the user name and password: D: \ Program Files \ Tomcat \ conf \ tomcat-users.xml


Integrate Tomcat into eclipse

1. select servers from other views, right-click in the blank area, select new-> server, and select your tomcat version, as shown in:


2. Add the installation path of Tomcat, as shown in:













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.