Installation of JSP server under WIN2000

Source: Internet
Author: User
Tags tomcat linux
js| server each contact with the JSP server is basically from the installation of JSP started, because the JSP is not like the ASP so almost no installation process, nor like PHP has an automatic installation of the package, JSP installation is more troublesome, manual steps are very many, Here's a step-by-step explanation:

First you have to download a few software: JDK, Apache, and Tomcat. The JDK (Java Development Kit) is the foundation of all Java applications, so you can say that all Java applications are built on this. It is a set of APIs, or some Java Class. I learn JSP at that time the latest version of the jdk1.x version, then Sun (solar Microelectronics, Java development Company) recommended the use of j2re, is now basically using the Java EE more people.

I believe you have heard that Java portability is very good, can be applied to a variety of system platforms, so many enterprises for the cost or security considerations also have the JSP built on Linux, some old-funded technicians think Linux+tomcat+apache is the perfect web platform, However, I think we should also consider that the development of the following Linux is not many technical personnel and development is more difficult than the Windows platform, development efficiency is greatly limited, so the web based on the Linux platform is actually in the late development and maintenance costs are very large, So I'm just saying how to install the JSP under WIN2000.

One: The installation of JDK (or Java EE)

Download JDK

Can go to Sun's official website to download JDK or Java EE, using similar methods, here to JDK as an example to explain: java.sun.com, there are many places in the country can be.
Under Windows, run the. exe file directly, and install to a directory such as C:JDK.

Configuring the System

Select My Computer on the desktop, right-advanced-environment variable,
Press "new" at the system variable
Enter in the variable name: CLASSPATH, enter the value of the variable:
C:jdklibdt.jar; C:jdklibtools. JAR; C:jdkbin
When you restart the computer after configuration, the environment variable takes effect.

Test

(1) Write a simple Java program with a text editor:
public class HelloWorld {
public static void Main (String args[]) {
System.out.println ("Hello world!");
}
}
This example is the famous "Hello World", its function is to show "Hello World".
Note: This file name must be "Helloworld.java" and case sensitive.
(2) Compile: Execute at DOS command prompt: (note case)
Javac Helloworld.java
If normal, the Helloworld.class file will be generated.
(3) Run: Execute at DOS command prompt: (note case)
Java HelloWorld
Well, running the Java HelloWorld should be a great "Hello world".

At this point, you have successfully configured the JDK, but the JDK is not able to execute the Web script and install Tomcat again.

Two: Install Tomcat

For starters, it's a good choice to implement JSP and Servlet,tomcat. Tomcat is a product of the Apache organization, and Sun's support for it is pretty good.

Download

Download address for Java official site: jakarta.apache.org, domestic also more.
From this address can be downloaded: http://jakarta.apache.org/builds/tomcat/release/
After downloading, extract to a directory to C:tomcat as an example.

Configuration

Select My Computer on the desktop, right-advanced-environment variable,
At the system variable point, new
Enter in variable name: java_home, input in variable value: C:JDK then OK;
At the system variable point, new
Enter in variable name: tomcat_home, input in variable value: C:tomcat then OK;
OK, the configuration is over, the environment variable will be valid after you restart the computer.
Note that the other settings for Tomcat, if not necessary, can not be changed, if you are not sure of the changes, or suggest not to change.

Test

(1) Start Tomcat:
Under C:tomcatin There is a: Startup.bat, run it, a DOS window will appear.
(2) Browse
Enter in browser: http://localhost:8080/See what effect (the Tomcat default port is 8080, you can change it without conflict), you should see a kitten or a tiger.
(3) Running
There are JSP examples and Servlet examples on this page, so let's test and run them yourself.
(4) Exit Tomcat
Under C:tomcatin There is a: Shutdown.bat, run it, will close the DOS window (but I usually just close this DOS window).

OK, if you just want to build a JSP server, do this OK, if you want to add database functionality, then install the configuration of a MySQL or also through JDBC access to other open standards of the database.


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.