JSP dynamic website development environment configuration detailed method page 1 / 2


Next, take Tomcat as the JSP engine and cooperate with tomcat, Apache and IIS to describe three schemes to build the JSP running environment.

1、 Introduction to related software

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

2. Apache server: a common web server developed by Apache organization to provide web services.

3. Tomcat server: a JSP engine developed by Apache organization. It 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 processing static HTML pages, and it is not as robust as Apache. Therefore, we generally use Tomcat with Apache to enable Apache to provide services for static page requests of websites, and tomcat, as a special JSP engine, provides JSP parsing for better performance. And Tomcat itself is a subproject of Apache, so Tomcat provides strong support for Apache. Tomcat is a good choice for beginners.

4、 mod_ Jk.dll: a plug-in developed by the Jakarta project team organized by Apache to enable Apache to support Tomcat. With this plug-in, Tomcat can connect seamlessly with Apache.

5. Tc4ntiis.zip: a plug-in developed by the Jakarta project team organized by Apache to enable IIS to support Tomcat.

2、 Software download

1、j2sdk Webjx.Com

Version: j2sdk1.4.1 (35.9mb)

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

http://www.timefound.com.cn/info/data/resource/download/j2sdk-1_4_1_01-windows-i586.exe 20070108


Version: Apache 2.0.43 (6.69mb) address: http://www.apache.inetcosmos.org/dist/httpd/binaries/win32/


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/


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

The above are free software.

3、 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).

The following are the references:

< title > JSP test page < / Title >
<%out.println(“<h1>Hello World! </h1>”);%>
< / HTML > (II) install J2SDK

Either way, you must complete the J2SDK installation before installing and configuring the JSP engine.

1. Install J2SDK

Under windows, run the downloaded j2sdk-1 directly_ 4_ 1_ 01-windows-i586.exe file. Install it to a directory according to the installation wizard, for example, to F: \ J2SDK 1.4.1;

2. Add environment variable

(1) If your operating system is win 98, you can directly edit autoexec.bat with notepad and add the following command line:

The following are the references:


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, right-click “my computer”, select “properties” → “system characteristics” → “advanced” → “environment variables” in the pop-up menu, and the environment variables dialog box pops up, you can edit the environment variables of the system. Add path, Java_ Home and classpath are three variables, and the variable values are the same as above.