Configuration of JSP development environment in Windows System environment

Source: Internet
Author: User
Tags command line iis variables version variable web services window zip
Js|window

Sun's JSP (Java Server Pages) is a dynamic web development technology that executes on the server side, based on Java technology. When executing a JSP, you need to set up an engine that compiles JSP pages on the Web server. There are several ways to configure a JSP environment, but the main task is to install and configure the Web server and the JSP engine.

The following is the use of Tomcat as a JSP engine, with Tomcat, Apache, IIS three kinds of Web servers to tell the 3 kinds of building JSP operating environment scenarios.

introduction of related software

1, J2SDK:JAVA2 software development tools, is the basis of Java applications. JSP is based on Java technology, so you must install J2SDK before you configure the JSP environment.

2. Apache server: A common Web server developed by the Apache organization that provides Web services.

3, Tomcat server: Apache development of a JSP engine, itself has the function of a Web server, can be used as a stand-alone Web server. However, when Tomcat handles static HTML pages as a Web server, not as fast as Apache or as robust as Apache, we typically use Tomcat in conjunction with Apache so that Apache can service static page requests for the site, Tomcat, as a dedicated JSP engine, provides JSP parsing for better performance. And Tomcat itself is a subproject of Apache, so Tomcat provides strong support for Apache. For beginners, Tomcat is a good choice.

4, Mod_jk.dll:Apache organization Jakarta Project team developed to enable Apache support Tomcat Plug-ins. With this plugin, Tomcat is able to seamlessly connect to Apache.

5, Tc4ntiis.zip:Apache organization Jakarta Project team developed to enable IIS to support Tomcat Plug-ins.

second, 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

All of the above are free software.

III. Preparation before the configuration

1. Prepare a Test JSP page

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

   JSP test page    <%out.println ("Hello world! ");%>  

2. Installation J2SDK

Regardless of the scenario, you must complete the installation of the J2SDK 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 to a directory based on the installation wizard, such as installing to F:\J2SDK 1.4.1;

Adding environment variables

1 If your operating system is win 98, you can edit Autoexec.bat directly with Notepad, 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 environment variables you add are valid.

2 If your operating system is Win2000, configure the environment variables as follows. Right click on "My Computer", in the pop-up menu select "Properties" → "system features" → "Advanced" → "Environment variables", Pop-up Environment Variables dialog box, you can edit the system environment variables. Add path, Java_home, and classpath three variables with the same value as above.

four, the JSP environment configuration scheme

Programme one: J2sdk+tomcat

In this scenario, Tomcat is used as both a JSP engine and a Web server, and is relatively simple to configure.

1. Install Tomcat

Run the download directly jakarta-tomcat-4.0.1.exe, follow the usual Windows program installation steps to install the Tomcat, installed it will automatically find the location of the J2SDK. For example, install to F:\TOMCAT4.

2. Configure Tomcat Environment variables

Add a new environment variable tomcat_home, the variable value is F:\TOMCAT4, add method and J2SDK environment variable configuration method.

3. Test default Service

The Tomcat server can be run after Setup is complete. Start Tomcat with F:\tomcat4\bin\startup.exe and close with F:\tomcat4\bin\shutdown.exe. (if prompted out of the environment space error when executing startup.exe or Shutdown.exe, select "Properties" → "Memory" → "normal memory" in the menu of the DOS window, and modify the "initial environment" from "automatic" to "2816" It's OK. )

After you start Tomcat, open the browser, enter http://localhost:8080 in the Address bar (the Tomcat default port is 8080), and if you see the Tomcat welcome interface in the browser, the Tomcat is working properly.



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.