JSP connection SQL Server 2000 system configuration

Source: Internet
Author: User
Tags mssqlserver tomcat

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

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.