How to install Apache Servlet

Source: Internet
Author: User

This article only discusses how to install Apache Servlet on Windows NT 4.0.

The configuration in this article is as follows:
Windows NT 4.0
Jdk1_2_2-001-win.exe
Apache_1_3_12_win32.exe
ApacheModuleJServ. dll
Tomcat.zip (3.0)

I. Software Download
◆ JDK http://java.sun.com/products/jdk/1.2/
◆ Apache Server http://www.apache.org/dist/binaries/win32/apache_1_3_12_win32.exe
Http://jakarta.apache.org/builds/tomcat/release/v3.0/win32/ApacheModuleJServ.dll of Apache JServ
◆ Tomcat http://jakarta.apache.org/builds/tomcat/release/v3.0/tomcat.zip

Ii. Software Installation

1) JDK

Install jdk1_2_2-001-win.exe using the default configuration. The default installation directory of JDK is C: \ jdk1.2.2, and the default installation directory of JRE is C: \ Program Files \ mongooft \ JRE \ 1.2;

2. restart the computer;

3. Update the following environment variables: append the C: \ jdk1.2.2 \ bin directory to the PATH, and append C: \ jdk1.2.2 \ lib \ tools. jar; C: \ jdk1.2.2 \ lib \ dt. add jar to CLASSPATH. Update
Method: Choose Control Panel> system> environment> system variables;

4. Test the applet:
1) Open the command window;
2) switch to the C: \ jdk1.2.2 \ demo \ applets \ TicTacToe directory;
3) Run appletviewer example1.htm;
4) Everything is normal;

5. test application:
1) create a test. Java file under my D: \ HZQ \ java directory. The content is as follows:

 
 
  1. Public class test
  2. {
  3. Public static void main (String arc []) {
  4. System. out. println ("JDK has been installed successfully. Thank you! ")
  5. }
  6. }

2) Open the command window;
3) switch to the D: \ HZQ \ Java directory;
4) Run javac test. java for compilation;
5) run java test to run the program;
6) Everything is normal.

2) Apache Server

1. Double-click the apache_1_3_12_win32.exe file and use the default configuration for installation. The default installation directory is C: \ Program Files \ Apache Group \ Apache. I will use $ APACHE_ROOT instead of the installation destination;

2. Modify $ APACHE_ROOT \ conf \ httpd. conf:
1) PORT is used to set the Port number for running Apache Web Server. Because IIS is running here, IIS uses PORT 80, so I changed it to Port 8080, after entering http: // localhost: 8080/in the browser, you can access the Apache Web Server. When entering http: // localhost/, you can access IIS, in this way, both Web servers can be used. I use the $ APACHE_PORT ID;

2) DocumentRoot sets the document root directory. When you enter http: // localhost:/$ APACHE_PORT/in the browser, the server reads data from the document root directory, since all my programs are under D: \ HZQ, I set DocumentRoot to D:/HZQ;

3. After Apache is installed, add an Apache Web Server menu group to the "Start-> program" menu group and run the Install Apache as a service command, in this case, an Apache service is added to "start-> set-> Control Panel-> service". You can use it to start or stop the Apache service;

4. Open "start-> Settings-> Control Panel-> service", select the Apache service, and press "start" to start the Apache Servlet service;

5. Input http: // localhost:/$ APACHE_PORT/in the browser to view all the files under D: \ HZQ. This indicates that the Apache service has been installed successfully.

3) Apache JServ

1. Copy the ApacheModuleJServ. dll file to the $ APACHE_ROOT \ modules directory;

2. Modify $ APACHE_ROOT \ conf \ httpd. conf: Add LoadModule jserv_module modules/ApacheModuleJServ. dll to the file to start Apache JServ;

3. Restart the Apache service.

4) Tomcat

1. Decompress tomcat.zip to a directory with winzipet. I decompress it to C: \. It will automatically create a tomcat subdirectory, so that a directory C:/tomcat will be added to drive C, I use $ TOMCAT to identify;

2. Open the $ APACHE_ROOT \ conf \ httpd. conf file and add a similar sentence at the end of the file:
Include $ TOMCAT/etc/tomcat. conf
Here I will Include C:/tomcat/etc/tomcat. conf;

3. Modify the port number for running Tomcat. Note that Tomcat has an independent HTTP server.
The port number used. The port number 8081 is not occupied yet. I use $ TOMCAT_PORT to identify it and assign it to Tomcat:
1) Open $ TOMCAT/server. xml;
2) Modify ContextManager:

4. Double-click startup. bat in the $ TOMCAT directory to start Tomcat;

5. Enter http: // localhost:/$ TOMCAT_PORT/in the browser to view the Tomcat Version 3.0 page.
It indicates that Tomcat is successfully installed;

6. Enter http: // localhost:/$ APACHE_PORT/examples/servlets/in the browser.
Servlet Examples with Code indicates that Apache Servlet has succeeded;

7. Enter http: // localhost:/$ APACHE_PORT/examples/jsp/in the browser to view the jsp Samples.
This page indicates that Apache + jsp is successful.

  1. Servlet Engine installation
  2. Configure the Servlet Development Environment
  3. JSP Servlet call in tag Library
  4. Small issues encountered when learning Java Servlet
  5. Servlet sharing links in sessions

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.