Home Backend Development PHP Tutorial Integrating Apache2 and Tomcat4_PHP Tutorial under jsp+phpWindows2000

Integrating Apache2 and Tomcat4_PHP Tutorial under jsp+phpWindows2000

Jul 13, 2016 pm 05:28 PM
Down and I Integrate test

============================================= I have tested this article and passed it Got it! ============================================= Title: Integration under Windows 2000 Apache2 and Tomcat4 Author: robornet Date: 2002-10-30 Reason: I have been working on a java project for a while, and when it was time to distribute it, I could not find the latest integrated configuration of Apache2 and Tomcat4, so I watched jakarta for a long time. Based on online information and referring to previous netizens’ articles, I wrote this configuration document for reference. Any corrections are welcome! Contents: 1. Software preparation 2. Software installation 3. Initial configuration and testing 4. Integrated configuration 5. Full line test 6. Deficiencies 7. Thank you 8. Explanation steps: 1. Software preparation: Suppose you have a hard drive that can run win2000 normally. Soft software environment. 1.j2sdk1.4.1: Go to http://java.sun.com/j2se/1.4.1/download.html to download! (Note that it is the sdk version of Windows (all languages, including English)) 2.Apache2.0.43: Go to http://www.apache.inetcosmos.org/dist/httpd/binaries/win32/apache_2.0.43-win32-x86- no_ssl.msi Download! 3.Tomcat4.1.12: Go to http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/v4.1.12/bin/jakarta-tomcat-4.1.12.exe to download! 4.mod_jk.dll: Go to http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/v1.2.0/bin/win32/mod_jk-2.0.42.dll to download! (Explanation, since the configuration of mod_jk2-2.0.43.dll and Apache2.0.43 was not successful, mod_jk-2.0.42.dll is used instead) 2. Software installation: (1) Install j2sdk: 1. Follow the installation wizard to install (generally Install to C:j2sdk1.4.1 to facilitate the following operations) (2) Install apache: 1. Follow the installation wizard to install (select the installation directory as C: to facilitate the following operations; after the installation is successful, the path is: C:Apache2) ( 3) Install Tomcat: 1. Follow the installation wizard to install (change the installation directory to C: Tomcat4, if it is just for testing, there is no need to install tomcat as Services to facilitate the following operations), during which you will be asked to enter Admin (system administrator) Password. 3. First-time configuration and testing: Configure the software environment installed above for the first time and test its environment. (1) Configuration--Environment variables: 1. Create a new system variable JAVA_HOME, its value is: C:j2sdk1.4.1 //If you did not install according to the above path, please change it to the correct path 2. Create a new system variable TOMCAT_HOME, its value is: :C:Tomcat4 //Same as above 3. Create a new system variable CLASSPATH, its value is: %JAVA_HOME%lib;%TOMCAT_HOME%lib (2) Modify the error: 1.Apache2.0.43 has a small problem. After the default installation is successful, it will be installed on the Apache2 main There is no index.html file in the htdocs directory. You must rename index.html.en in this directory to index.html (3) Test the default service: Please run Apache2 and Tomcat4 first. 1. Open the browser and click on Enter: http://localhost in the address bar. Verification: At this time, you can see the welcome interface of Apache2 in the browser. It means that Apache2 is working normally. (Note that the default port of Tomcat is 80. If it is occupied by other programs, please change it, as follows There are instructions) 2. Open the browser and enter: http://localhost:8080 in the address bar. Verification: You can see Tomcat’s welcome interface in the browser at this time. It means that Tomcat is working normally. (Note that the default port of Tomcat is 8080. If it is occupied by other programs, please change it. There are instructions below) Summary: If there are no errors at this step, you can continue with the following operations. Let go! (4) Test your project: Now only use Tomcat to test your project Project, for the convenience of this example, assume that you already have a project in the E:ApplicationOA directory (including index.jsp and other jsp files and beans, such as servlets and javabeans under WEB-INFclasses). 1. Set up Tomcat to support your project, open the C:Tomcat4confserver.xml file, add before "" and after "" and save it. Description: Context (representing a web application): docBase defines the path of the application; path represents the prefix of the URL of this web application, so that the requested URL is http://localhost:8080/oa; reloadable This attribute is very important. If it is true, tomcat will automatically detect changes in the application's /WEB-INF/lib and /WEB-INF/classes directories, automatically load modified or new beans and servlets, and we can view them without restarting tomcat. To the changes brought to jsp by beans. 2. Start your Tomcat 4.1.12 and enter http://localhost:8080/oa in the browser address. If there are no errors in your jsp, beans, and servlets, your index.jsp/index.html file will generally be The content is executed and displayed. Summary: If there are no errors at this step, you can continue with the following operations, Let go! 4. Integrated configuration: Configure Apache and Tomcat accordingly and let them work together for you. If Apache2 and Tomcat4 are running, please close them. (1) Configure Apache2: 1. First copy the downloaded mod_jk-2.0.42.dll to C:Apache2modules. 2. Set the homepage file type: Open httpd.conf under C: Apache2conf, search for "DirectoryIndex", add index.jsp after index.html and save it. Note that there should be spaces between each other. 3. Set up a virtual host and let Apache automatically control the parsing of html and jsp: Open C: Apache2confhttpd.conf, add the following code at the end and save it. //localhost is the local machine, you can use the local ip ServerAdmin robornet@robornet.com //Your email address DocumentRoot E:Application //Your project group root directory, because there are OA and other projects under Application , so it can only be set to E:Application ServerName localhost //Your service name, if your machine has a domain name, set it to the domain name, but now use this machine for testing ErrorLog logs/robornet_home_log.txt //Error log, in C: Under Apache2logs, you can use any other name CustomLog logs/robornet_Custom_log.txt common //Access log, under C: Apache2logs, you can use any other name 4. Set up the connection between Apache and Tomcat so that when Apache encounters a jsp file , hand it over to Tomcat for processing in the background: open C: Apache2confhttpd.conf, add the following code at the end and save it. # Using mod_jk2.dll to redirect dynamic calls to Tomcat LoadModule jk_module modules/mod_jk-2.0.42.dll //Loading module, used to handle connection JkWorkersFile "C:/Tomcat4/conf/workers.properties" //Setting up the module file, the following will explain JkLogFile "C:/Tomcat4/logs/mod_jk2.log" //Set the log file for module work. Tocmat will build its own JkMount /servlet/* ajp13 when it starts. //Let Apache support servlet transmission for Tomcat parsing JkMount /*.jsp ajp13 //Let Apache support jsp transmission for Tomcat parsing Summary: At this point, the configuration of Apache is basically completed, but starting Apache at this time does not work properly. (2) Configure Tomcat4: 1. Create a new file workers.properties under C:Tomcat4conf. Pay attention to the file suffix. It is recommended to use EditPlus or UltraEdit to create it. If you use Notepad, remember to change the name so that it does not become workers.properties.txt! Its content As follows: workers.tomcat_home=c:Tomcat4 //Let the mod_jk module know Tomcat workers.java_home=c:j2sdk1.4.1 //Let the mod_jk module know j2sdk ps= worker.list=ajp13 //Module version, the existing ajp14 is not required Modify worker.ajp13.port=8009 //Working port, if it is not occupied, there is no need to modify worker.ajp13.host=localhost //This machine, if the Apache host above is not localhost, modify worker.ajp13.type=ajp13 accordingly. //Type worker.ajp13.lbfactor=1 //Number of agents, no need to modify 2. Open the server.xml file under C:Tomcat4conf: Find "" and change the previous code: Change to: Save and close. Summary: Brothers must be tired! Okay, you can have a drink java, enjoy your results! 5. Full test: 1. Start Apache2, Tomcat4. 2. Open your browser and enter http://localhost:8080/oa in the address bar. If it is the same as the above test, Tomcat will be normal after reconfiguration! 3. Enter http://localhost/oa in the address bar. If the result is the same as http://localhost:8080/oa, congratulations, the integration of Apache2 and Tomcat4 is successful! ! ! 6. Shortcomings: 1. Although I use the latest Apache2.0.43 and Tomcat4.1.12, I use jk to connect. The configuration with jk2 was not successful, so I had to write this document! 2. Tomcat still uses Tomcat-Standalone, not Tomcat-Apache, but you can do this yourself, and this should not be a problem! 7. Thanks: 1. Thanks to the Apache organization for providing me with such a good server, and it’s free! 2. Thanks to friends who have written Apache1.x and Tomcat3.x/Tomcat4.* configuration documents before, for providing me with a reference for writing this document today! 8. Description: 1. If you are satisfied and want to reprint or collect this article, I would like to thank you very much, but please indicate the author robornet and the source http://www.xtong.com.cn/rob

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/531776.htmlTechArticle======================== ===================== I have passed the test of this article! ============================================= Title: Integration under Windows 2000 Apache2 and Tomcat4 Author:...
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

What do you think of furmark? - How is furmark considered qualified? What do you think of furmark? - How is furmark considered qualified? Mar 19, 2024 am 09:25 AM

What do you think of furmark? 1. Set the "Run Mode" and "Display Mode" in the main interface, and also adjust the "Test Mode" and click the "Start" button. 2. After waiting for a while, you will see the test results, including various parameters of the graphics card. How is furmark qualified? 1. Use a furmark baking machine and check the results for about half an hour. It basically hovers around 85 degrees, with a peak value of 87 degrees and room temperature of 19 degrees. Large chassis, 5 chassis fan ports, two on the front, two on the top, and one on the rear, but only one fan is installed. All accessories are not overclocked. 2. Under normal circumstances, the normal temperature of the graphics card should be between "30-85℃". 3. Even in summer when the ambient temperature is too high, the normal temperature is "50-85℃

Join a new Xianxia adventure! 'Zhu Xian 2' 'Wuwei Test' pre-download is now available Join a new Xianxia adventure! 'Zhu Xian 2' 'Wuwei Test' pre-download is now available Apr 22, 2024 pm 12:50 PM

The "Inaction Test" of the new fantasy fairy MMORPG "Zhu Xian 2" will be launched on April 23. What kind of new fairy adventure story will happen in Zhu Xian Continent thousands of years after the original work? The Six Realm Immortal World, a full-time immortal academy, a free immortal life, and all kinds of fun in the immortal world are waiting for the immortal friends to explore in person! The "Wuwei Test" pre-download is now open. Fairy friends can go to the official website to download. You cannot log in to the game server before the server is launched. The activation code can be used after the pre-download and installation is completed. "Zhu Xian 2" "Inaction Test" opening hours: April 23 10:00 - May 6 23:59 The new fairy adventure chapter of the orthodox sequel to Zhu Xian "Zhu Xian 2" is based on the "Zhu Xian" novel as a blueprint. Based on the world view of the original work, the game background is set

Database testing skills in Golang Database testing skills in Golang Aug 10, 2023 pm 02:51 PM

Database testing skills in Golang Introduction: Database testing is a very important link when developing applications. Appropriate testing methods can help us discover potential problems and ensure the correctness of database operations. This article will introduce some common database testing techniques in Golang and provide corresponding code examples. 1. Testing using an in-memory database When writing database-related tests, we usually face a question: How to test without relying on an external database? Here we can use memory

How to use MTR to conduct reliability testing of MySQL database? How to use MTR to conduct reliability testing of MySQL database? Jul 13, 2023 pm 12:05 PM

How to use MTR to conduct reliability testing of MySQL database? Overview: MTR (MySQL Test Runner) is a testing tool officially provided by MySQL, which can help developers conduct functional and performance testing of MySQL databases. During the development process, in order to ensure the reliability and stability of the database, we often need to conduct various tests, and MTR provides a simple, convenient and reliable method to conduct these tests. Steps: Install MySQL test runner: First, you need to download it from the MySQL official website

The new king of domestic FPS! 'Operation Delta' Battlefield Exceeds Expectations The new king of domestic FPS! 'Operation Delta' Battlefield Exceeds Expectations Mar 07, 2024 am 09:37 AM

"Operation Delta" will launch a large-scale PC test called "Codename: ZERO" today (March 7). Last weekend, this game held an offline flash mob experience event in Shanghai, and 17173 was also fortunate to be invited to participate. This test is only more than four months away from the last time, which makes us curious, what new highlights and surprises will "Operation Delta" bring in such a short period of time? More than four months ago, I experienced "Operation Delta" in an offline tasting session and the first beta version. At that time, the game only opened the "Dangerous Action" mode. However, Operation Delta was already impressive for its time. In the context of major manufacturers flocking to the mobile game market, such an FPS that is comparable to international standards

How to use Selenium for automated web testing How to use Selenium for automated web testing Aug 02, 2023 pm 07:43 PM

Overview of How to Use Selenium for Web Automation Testing: Web automation testing is a vital part of the modern software development process. Selenium is a powerful automated testing tool that can simulate user operations in a web browser and implement automated testing processes. This article will introduce how to use Selenium for web automation testing, and come with code examples to help readers get started quickly. Environment preparation Before starting, you need to install the Selenium library and web browser driver

What are the differences between function testing and coverage in different languages? What are the differences between function testing and coverage in different languages? Apr 27, 2024 am 11:30 AM

Functional testing verifies function functionality through black-box and white-box testing, while code coverage measures the portion of code covered by test cases. Different languages ​​(such as Python and Java) have different testing frameworks, coverage tools and features. Practical cases show how to use Python's Unittest and Coverage and Java's JUnit and JaCoCo for function testing and coverage evaluation.

How to disable test cases in Maven? How to disable test cases in Maven? Feb 26, 2024 am 09:57 AM

Maven is an open source project management tool that is commonly used for tasks such as construction, dependency management, and document release of Java projects. When using Maven for project build, sometimes we want to ignore the testing phase when executing commands such as mvnpackage, which will improve the build speed in some cases, especially when a prototype or test environment needs to be built quickly. This article will detail how to ignore the testing phase in Maven, with specific code examples. Why you should ignore testing During project development, it is often

See all articles