Dynamic IP build your own web site method JSP and ASP Integration

Source: Internet
Author: User
JSP and ASP Integration  
Author: Light rain forecast
Applicable languages: Visual Basic Java. net
File Size 6441
Running platform: Windows Server 2003 Windows 2000 Windows XP
Uploaded: 7654321
Upload Date: 08:36:58
Click: 618
Introduction Dynamic IP build your own web site method JSP and ASP Integration
Technical documents

First, we need the --- ddns software (similar to the peanut shell software)

Win2000server debugging passed

I. Introduction to related software

1. j2sdk: the software development tool of Java2, which is the basis of Java applications. JSP is based on Java technology, so you must install j2sdk before configuring the JSP environment.

2. Tomcat server: a JSP engine developed by Apache. It has the Web server function and can be used as an independent web server. However, in terms of Web server, Tomcat does not process static html pages as quickly as Apache, and Apache is not robust. Therefore, we generally use Tomcat with Apache, apache provides services for website static page requests, while tomcat, as a dedicated JSP Engine, provides JSP parsing for better performance. Tomcat itself is a sub-project of Apache, so Tomcat provides powerful support for Apache. Tomcat is a good choice for beginners.

3. tc4ntiis.zip: this plug-in is developed by the Jakarta project team of Apache to enable IIS to support tomcat.

2. Software Download

1. j2sdk

Version: j2sdk1.4.1 (35.9 MB)

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

 
2. tomcat4

Version: 4.1.21 (8.33 MB)

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

  
3366tc4ntiis.zip (220kb)

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

3. Preparations before configuration

(2) install j2sdk

In either case, you must install j2sdk before installing and configuring the JSP Engine.

1. Install j2sdk

Run the j2sdk-00004_000001-windows-i586.exe file in windows and install it in a directory according to the installation wizard, for example, F: j2sdk 1.4.1;

2. Add Environment Variables

Path = F: j2sdk1.4.1in
Set java_home = F: j2sdk1.4.1
Set classpath = F: j2sdk1.4.1lib ools. Jar

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

(2) If the operating system is Win2000, configure the environment variables as follows. Right-click my computer and choose Properties> system features> advanced> environment variables from the shortcut menu. The environment variables dialog box is displayed, you can edit the environment variables of the system. Add three variables: path, java_home, and classpath. The variable value is the same as the preceding one.

Iv. jsp environment configuration Scheme

J2sdk + Tomcat

In this solution, Tomcat serves as both a JSP engine and a Web server, and the configuration is relatively simple.

1. install Tomcat

Run the downloaded jakarta-tomcat-4.0.1.exe directly and install Tomcat according to the general installation steps of Windows programs. During installation, Tomcat is automatically located in j2sdk. For example, install it to F: omcat4.

2. Configure Tomcat Environment Variables

Add a new environment variable tomcat_home with the variable value F: omcat4. Add the same method as the j2sdk environment variable configuration method.

3. Test the default service

After setting, you can run the Tomcat server. Start Tomcat with F: omcat4instartup.exe and disable Tomcat with F: omcat4inshutdown.exe. (If an out of environment space error is prompted when startup.exeor shutdown.exe is executed, select "properties" → "Memory" → "regular memory" in the menu of the DOS window ", change "initial environment" from "automatic" to "2816 .)

After starting tomcat, open the browser and enter http: // localhost: 8080 in the address bar. If you see the welcome interface of tomcat in the browser, indicates that Tomcat works normally.

4. Test Items

Run the test. put JSP in the F: tomcatwebappsexamplesjsp directory, and enter http: // localhost: 8080/examples/JSP/test in the address bar. JSP. If "Hello World!" is displayed in the browser! ", It indicates that your JSP environment has been configured successfully!
Test cases:
<HTML>
<Head>
<Title> JSP test page </title>
</Head>
<Body>
<% Out. println ("</Body>
</Html>
5. Solution j2sdk + IIS + Tomcat

The most common web server on Windows is undoubtedly IIS. Under normal circumstances, IIS does not support JSP. We can use an IIS-to-Tomcat redirection plug-in, enable IIS to send all JSP requests to Tomcat for execution, and enable IIS to process JSP requests. If you are used to IIS, try this configuration. (If you have installed the Apache server, uninstall Apache first to facilitate subsequent operations .)

1. Follow the steps in solution 1 to install Tomcat and ensure its normal operation. (For example, to F: omcat4 );

2. Extract the downloaded tc4ntiis.zip file to the F: omcat4 directory (overwrite the original project ). View the files required for the configuration and make sure they are in the following locations:

F: omcat4serverlibajp. Jar
F: omcat4serverlib omcat-util.jar F: omcat4in
Ativeisapi_redirect.dll F: omcat4conf
Tiisworkers. properties F: omcat4conf
Tiisuriworkermap. properties F: omcat4conf
Tiisiis_redirect.reg
F: omcat4logiis_redirect.log

3. Open F: omcat4conf in a text editor.
Tiisworkers. properties:

Workers. tomcat_home = F: omcat4
Workers. java_home = F: j2sdk1.4.1

4. Double-click F: omcat4conf.
Tiisiis_redirect.reg: add the information in this registration file to the registry, but modify the key values of the three keys: LOG_FILE, worker_file, and worker_mount_file, to suit your environment (for example, tomcat in this article is installed in F: omcat4, rather than the default C: omcat4 ). Added and modified.

5. Open the Internet Service Manager and add a new virtual directory named Jakarta to the default site. The virtual directory points to F: omcat4in.
And start the default site.

6. In Internet Service Manager, right-click the server name and select the "edit"> "ISAPI filter" tab of "properties"> "main attribute" www service, add an ISAPI filter named Jakarta redirect and specify the executable file as F: tomcat4in.
Ativeisapi_redirector.dll. After the ISAPI filter is added, the Jakarta redirect status is a red downward arrow. After the IIS service is restarted, it becomes a green arrow.

7. Edit and save the server. xml file.
Configure Tomcat

Open F: tomcat4confserver. XML in a text editor. Because tomcat4 does not enable ajp13 by default, the following code is found:

<! --
<Connector classname = "org. Apache. AJP. tomcat4.ajp13connector"
Port = "8009" minprocessors = "5" maxprocessors = "75" acceptcount = "10" DEBUG = "0"/>
-->

Annotate the symbol <! --> Delete to enable ajp13.

Save,

8. Restart IIS and tomcat.

9. Test Project: place test. jsp in the F: tomcatwebappsexamplesjsp directory. Open your browser and enter http: // localhost: 8080/examples/JSP/test. jsp in the address bar. If "Hello world! ", Tomcat will work normally after reconfiguration. in the address bar, enter http: // localhost/examples/JSP/test. JSP. If it is different from http: // localhost: 8080/examples/JSP/test. if the JSP results are the same, the integration of IIS and Tomcat is successful!

Note: The software can also be accessed in the IIS web directory !!!

Wanghai WebMail Server Construction Process

For more information about how to modify it to winwebmail, see winwebmail help document.

Note: The latest problem is how to publish two web services on a Web server because port 80 is fixed. (in this case, it is impossible to publish two sites, but you can think about it. For example, viewhigh.vip.cn is the website of this company, the residual link is viewhigh.vip.cn/default.aspand serves 2 WebServices at the same site ).

Suggestion: Change the server to win2000server to facilitate IIS and tomcat integration configuration.

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.