JSP server installation and configuration (with database, novice)

xiaoxiao2021-03-06  43

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, after downloading J2SDK; after installation, set environment variables: My computer --- Property - Advanced - Environment Variables;

Select --- System Variable (S): Set the Java_Home environment variable:

Click - New, enter: java_home in the variable name

Enter: D: / Java in the variable value

(Suppose J2SDK is installed under the directory D: / java, anyway is the J2SDK installation directory.)

Then --- OK, you have set a Java_Home environment variable.

Set the ClassPath environment variable:

Click - New, enter: ClassPath in the variable name

Enter: d: / java / lib; d: /java/lib/tt.jar; D: /java/lib/tools.jar

(Middle point "." And semicolons ";" essential.)

Then --- OK, you have set the ClassPath environment variable.

Set the PATH environment variable:

Click - New, enter: path in the variable name: Path

Enter: D: / java / bin in the variable value;

(Middle point "." And semicolons ";" essential.)

Then --- OK, you have set a Java_Home environment variable.

After the three environment variables are set, write a simple Java program to test whether J2SDK has been installed successfully:

Create a directory TEST in d: / next; then write the following procedure: public class test {public static void main (string args []) {system.out.println ("this is a test program");}}

Save the above program as file named Test.java, saved under the directory D: / Test.

Then open the command prompt window, CD to your TEST directory, and type the following command

Javac Test.java Java Test

At this point, if you see the THIS A Test Program. If you have successful installation,

If you don't print this sentence, you need to check your configuration carefully.

If the J2SDK is installed in the above, let's continue to install Tomcat:

Step 2: ---- Install Tomcat:

To Tomcat Official Site (http://www.apache.org/dist/jakarta/tomcat-4/) download Tomcat:

JAKARTA-TOMCAT-4.1.30.EXE, after downloading. (Such as installed under D: / Tomcat.)

After installation, set the environment variable: my computer --- Properties - Advanced - Environmental Variables;

Select --- System Variable (S):

Set the Catalina_Home environment variable:

Click - New, enter in the variable name: Catalina_home

Enter: D: / Tomcat in variable values

Then - determined that the Catalina_Home environment variable has been set.

Set the Catalina_Base environment variable:

Click - New, enter in the variable name: Catalina_base Enter: D: / Tomcat

Then - determined that the Catalina_Base environment variable is set.

Then modify the ClassPath in the environment variable, add servlet.jar under CommON / lib under the Tomat installation directory to ClassPath,

The modified ClassPath is as follows:

ClassPath = D: / java / bin;; D: / java / lib; d: /java/lib/dt.jar; d: /java/lib/tools.jar; d: / tomcat / common / lib / servlet .jar

You can then start Tomcat, access http: // localhost: 8080 in IE, if you see the Tomcat's welcome page, the installation is successful.

转载请注明原文地址:https://www.9cbs.com/read-55008.html

New Post(0)