Installation and configuration of JSP servers (with databases for beginners)

Source: Internet
Author: User

Download address: http://java.sun.com/products/archive/j2se/1.4.2_06/index.html

Step 1: ---- install J2SDK:

To the SUN official site (http://java.sun.com) download J2SDK Installation File: j2sdk-1_4_2_04-windows-i586-p.exe, download and install J2SDK; after installation, set environment variables: My computer --- properties --- advanced --- environment variables;

Select --- system variable (S ):
 
Set the JAVA_HOME environment variable:

Click --- New and enter JAVA_HOME in the variable name.

Enter D: Java in the variable value

(Assume that J2SDK is installed in Directory D: Java, which is the installation directory of J2SDK .)

Then --- OK. The JAVA_HOME environment variable has been set here.

Set the CLASSPATH environment variable:

Click --- New and enter CLASSPATH in the variable name.

Enter D: Javain;.; D: Javalib; D: Javalibdt. jar; D: Javalibools. jar in the variable value.

(The dot "." And Semicolon ";" in the middle are required .)

Then --- OK. Now the CLASSPATH environment variable has been set.

Set the PATH environment variable:

Click --- New and enter PATH in the variable name

Enter D: Java;.; D: Javain in the variable value.

(The dot "." And Semicolon ";" in the middle are required .)

Then --- OK. The JAVA_HOME environment variable has been set here.

After setting the three environment variables, write a simple java program to test whether J2SDK has been installed successfully:

Create a directory test under D: and write the following program:
Public class Test {
Public static void main (String args []) {
System. out. println ("This is a test program .");
}
}

Save the above program as a file named Test. java and save it in the Directory D: est.

Then open the Command Prompt window, cd to your test directory, and then type the following command

Javac Test. java
Java Test

If This is a test program is printed, the installation is successful,

If this statement is not printed, You need to carefully check your configuration.

If the above J2SDK is successfully installed, continue to install tomcat (a very useful JSP running platform ):

Step 2: ---- install tomcat (a very useful JSP running platform ):

To tomcat (a very useful JSP operating platform) official site (http://www.apache (Unix platform's most popular WEB server platform ). org/dist/jakarta/tomcat (a very useful JSP running platform)-4/) download tomcat (a very useful JSP running platform ):

Jakarta-tomcat(a very useful jspruntime platform running -4.1.30.exe, download and install it. (For example, install it on D: omcat (a very useful JSP running platform .)

After installation, set the environment variable: My computer --- properties --- advanced --- environment variable;

Select --- system variable (S ):

Set the CATALINA_HOME environment variable:

Click --- New and enter CATALINA_HOME in the variable name.

Enter D: omcat in the variable value (a very useful JSP running platform)

Then --- OK. Now the CATALINA_HOME environment variable has been set.

Set the CATALINA_BASE environment variable:

Click --- New and enter CATALINA_BASE in the variable name.

Enter D: omcat in the variable value (a very useful JSP running platform)

Then --- OK. Now the CATALINA_BASE environment variable has been set.

Modify the CLASSPATH in the environment variable and append the servlet. jar under commonlib under the Tomat installation directory to the CLASSPATH,

The modified CLASSPATH is as follows:

CLASSPATH = D: Javain;.; D: Javalib; D: Javalibdt. jar; D: Javalibools. jar; D: omcat (a useful JSP running platform) commonlibservlet. jar

Then you can start tomcat (a very useful JSP running platform) and access http: // localhost: 8080 in IE. If you see tomcat (a very useful JSP running platform) the installation is successful.

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.