First step:----Install J2SDK:
Download J2SDK installation files to the Sun official site (http://java.sun.com): j2sdk-1_4_2_04- Windows-i586-p.exe, download and install the J2SDK after installation, set environment variables: My Computer---attributes---advanced---environment variables;
Select---system variable (S):
To set the JAVA_HOME environment variable:
Click---New and enter in the variable name: java_home
Enter the value of the variable: D:\Java
(assuming J2SDK is installed in the directory D:\Java, it is the J2SDK installation directory anyway.) )
Then---determine that the JAVA_HOME environment variable has been set up to this.
To set the CLASSPATH environment variable:
Click---New and enter in the variable name: CLASSPATH
Enter the value of the variable: D:\Java\bin.;D: \ Java\lib;d:\java\lib\dt.jar;d:\java\lib\tools.jar
(The middle point number ".") and semicolon ";" Essential. )
Then---determine that the CLASSPATH environment variable has been set up to this.
To set the PATH environment variable:
Click---New and enter in the variable name: PATH
Enter the value of the variable: D:\Java.;D: \ Java\bin
(The middle point number ".") and semicolon ";" Essential. )
Then---determine that the JAVA_HOME environment variable has been set up to this.
After the three environment variables are set, write a simple Java program to test whether the J2SDK has been installed successfully:
Create a new directory test under D:\, and then 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, saved under the directory D:\test.
Then open the Command Prompt window, the CD to your test directory, and then type the following command
Javac Test.java
Java Test
At this point, if you see the print this is a test program, the installation is successful.
If you do not print out this sentence, you need to carefully check your configuration.
If the above J2SDK installation succeeds, continue with the Tomcat installation:
Step Two:----Install Tomcat:
To the Tomcat official site (http://www.apache.org/dist/jakarta/tomcat-4/) to download tomcat:
Jakarta-tomcat-4.1.30.exe, install after downloading. (for example, install under D:\Tomcat.) )
After installation, set environment variables: My Computer---attributes---advanced---environment variables;
Select---system variable (S):
To set the CATALINA_HOME environment variable:
Click---New and enter in the variable name: catalina_home
Enter the value of the variable: D:\Tomcat
Then---determine that the catalina_home environment variable has been set up to this.
To set the CATALINA_BASE environment variable:
Click---New and enter in the variable name: catalina_base
Enter the value of the variable: D:\Tomcat
Then---determine that the catalina_base environment variable has been set up to this.
Then modify the classpath in the environment variable and append the Servlet.jar 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
Then you can start Tomcat, access http://localhost:8080 in IE, and if you see the Tomcat Welcome page, the installation is successful.
If the above Tomcat installation succeeds, then continue installing the JSP Access driver for SQL Server 2000:
Step Three:----Install the JSP to access the SQL Server 2000 driver:
Download the driver from Microsoft's Web site: SQL Server for JDBC driver, random search in Google.
And then install it well. (For example, the installation directory is D:\SQLDriverForJDBC.) )
You must then have three jar files under the Lib directory in the installation directory:
Msbase.jar,mssqlserver.jar,msutil.jar Copy to the Common\lib directory under the Tomcat directory, and then modify the classpath in the environment variable,
The SQL Server for JDBC driver installation directory
D:\sqldriverforjdbc\lib\msbase.jar;d:\sqldriverforjdbc\lib\mssqlserver.jar;d:\sqldriverforjdbc\msutil.jar; Append 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:\lubeetomcat\common\lib\servlet.jar;
_d:\sqldriverforjdbc\lib\msbase.jar;d:\sqldriverforjdbc\lib\mssqlserver.jar;d:\sqldriverforjdbc\msutil.jar
Tomcat! must be restarted