Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to build the running Environment of JSP Program under Windows system

2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

Editor to share with you how to build the JSP program running environment under the Windows system. I hope you will get something after reading this article. Let's discuss it together.

I. introduction of related software

1. The software development tool of J2SDK:Java2 is the foundation of Java application. JSP is based on Java technology, so J2SDK must be installed before configuring the JSP environment.

2. Apache server: a commonly used Web server developed by Apache organization, which provides Web service.

3. Tomcat server: a JSP engine developed by Apache organization, which has the function of Web server and can be used as an independent Web server. However, as a Web server, Tomcat is not as fast as Apache when dealing with static HTML pages, nor is it as robust as Apache, so we generally use Tomcat with Apache to let Apache provide services for static page requests of the website, while Tomcat, as a dedicated JSP engine, provides JSP parsing to get better performance. And Tomcat itself is a sub-project of Apache, so Tomcat provides strong support for Apache. Tomcat is a good choice for beginners.

4. Mod_jk.dll:Apache organizes the plug-ins developed by the Jakarta project team to make Apache support Tomcat. With this plug-in, Tomcat can seamlessly connect with Apache.

5. Tc4ntiis.zip:Apache organizes the plug-ins developed by the Jakarta project team to make IIS support Tomcat.

II. Software download

1 、 j2sdk

Version: j2sdk1.4.1 (35.9MB)

Address: http://java.sun.com/j2se/1.4.1/download.html

2 、 Apache2

Version: Apache2.0.43 (6.69MB)

Address: http://www.apache.inetcosmos.org/dist/httpd/binaries/win32/

3 、 Tomcat4

Version: 4.1.21 (8.33MB)

Address: http://jakarta.apache.org/builds/jakarta-tomcat-4.0/release/

4. Mod_jk.dll: (136KB)

Address: http://jakarta.apache.org/builds/jakarta-tomcat-connectors/jk/release/

5. Tc4ntiis.zip (220KB)

Address: http://members.ozemail.com.au/~lampante/howto/tomcat/iisnt/tc4ntiis.zip

The above are all free software.

III. Preparation before configuration

1. Prepare a JSP web page for testing

Open a text editor, such as notepad, enter the following code, and save it as test.jsp (note that the extension is .jsp).

< HTML > < HEAD > < TITLE > JSP Test Page < / TITLE > < / HEAD > < BODY > < out.println ("< H2 > Hello World! < / H2 >"); < / BODY > < / HTML >

2. Install J2SDK

In either case, the installation of J2SDK must be completed before installing and configuring the JSP engine.

Install J2SDK

Under Windows, run the downloaded j2sdk-1_4_1_01-windows-i586.exe file directly and install it to a directory according to the installation wizard, for example, to f:/j2sdk 1.4.1

Add environment variabl

1) if your operating system is Win 98, you can edit Autoexec.bat directly with notepad and add the following command line:

PATH=%PATH%;f:/j2sdk1.4.1/bin

SET JAVA_HOME=f:/j2sdk1.4.1

SET CLASSPATH=f:/j2sdk1.4.1/lib/tools.jar

After saving, restart the computer so that the added environment variables are valid.

2) if your operating system is Win2000, configure the environment variables as follows. Right-click "my computer", in the pop-up menu, select "Properties" → "system properties" → "Advanced" → "environment variables", pop-up environment variables dialog box, you can edit the system environment variables. Add three variables, PATH, JAVA_HOME and CLASSPATH, with the same value as above.

IV. Configuration scheme of JSP environment

Option 1: J2SDK+Tomcat

In this scheme, Tomcat acts as both a JSP engine and a Web server, so it is relatively simple to configure.

1. Install Tomcat

Directly run the downloaded jakarta-tomcat-4.0.1.exe, follow the general Windows program installation steps to install Tomcat, it will automatically find the location of J2SDK. For example, install to f:/tomcat4.

2. Configure the environment variables of Tomcat

Add a new environment variable TOMCAT_HOME, whose value is f:/tomcat4, and add the same method as the configuration method of the J2SDK environment variable.

3. Test the default service

Once set up, you can run the Tomcat server. Start Tomcat with f:/tomcat4/bin/startup.exe and close with f:/tomcat4/bin/shutdown.exe. If you prompt Out of Environment Space error when executing startup.exe or shutdown.exe, select "Properties" → "memory" → "regular memory" in the menu of the DOS window, and change the "initial environment" from "automatic" to "2816". )

After starting Tomcat, open the browser and enter http://localhost:8080 in the address bar (the default port of Tomcat is 8080). If you see the welcome interface of Tomcat in the browser, Tomcat is working properly.

After reading this article, I believe you have a certain understanding of "how to build a JSP program running environment under the Windows system". If you want to know more about it, welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report