configuring the iis web server for jsp - shmorhay · configuring the iis web server for epicentric...

3
9/12/09 2:53 PM Configuring the IIS Web Server for JSP Page 1 of 3 file:///Users/shmorhay/Desktop/Bo_Shmorhay_Portfolio/iis.htm contents Configuring the IIS Web Server for Epicentric Foundation Server Software This document explains how to configure Microsoft Internet Information Server (IIS) for use with the a servlet engine and Epicentric Foundation Server™ software. EFS requires the Web server to support JSP 1.0 pages, either natively or through a third-party servlet engine such as JRun. Since IIS does not have a native servlet engine, Epicentric recommends that you use JRun with EFS. Complete this procedure before running the EFS installer. If JRun is already installed and working, refer to the Prerequisites for Installing Epicentric Foundation Server Software to review additional prerequisites and requirements, or refer to Installing Epicentric Foundation Server Software for full installation instructions. Configuring IIS Microsoft Internet Information Server (IIS) is a Windows-only web server used in conjunction with a servlet engine (for example, JRun), a database (for example, SQL Server), and a Java virtual machine (for example, the Sun JRE) to support and enable Epicentric Foundation Server. Before installing EFS, configure IIS (acting as a web server) to process JSP pages in conjuntion with the JRun servlet engine as follows: 1. Install IIS on your platform (per the Microsoft IIS installation instructions), and then stop IIS by double-clicking the Services icon in the Control Panel, selecting IIS Admin Service, and clicking Stop. Stopping IIS Admin Service should also stop the World Wide Web Publishing Service and the FTP Service; stop these services individually if they are not automatically stopped when IIS Admin Service is stopped. 2. If JRun (or other servlet engine) is running, stop it by selecting it within Services, and clicking Stop. 3. If IIS had been configured with JRun previously, delete any existing JRun connector files ( jrun.dll or jrun.ini) or any JRun log files ( jrunYYMMDD.log) already residing in the IIS scripts directory (typically c:\Inetpub\scripts\). 4. Assuming JRun is to be your servlet engine, you will need to map the file extension .jsp (JavaServer Page files) to the jrun.dll file in the IIS web server scripts directory (typically c:\Inetpub\scripts\). (If JRun will not be your servlet engine, check the servlet engine documentation to determine how to map index.jsp to the IIS scripts directory.) Use the Windows 2000 Control Panel, Administrative Tools, Internet Service Manager icon to open a Microsoft Management Console (MMC) expandable hierarchical tree. Expand the tree by clicking on the plus signs, right-click the Default Web Site icon, then choose Properties to access three important tabs: the Web Site, Home Directory, and Documents tabs (which are all contained in the Default Web Site Properties dialog window). (On Windows NT, the Home Directory and Documents dialogs are also accessed using Default Web Site, Properties.)

Upload: dangthuan

Post on 28-Sep-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

9/12/09 2:53 PMConfiguring the IIS Web Server for JSP

Page 1 of 3file:///Users/shmorhay/Desktop/Bo_Shmorhay_Portfolio/iis.htm

contents

Configuring the IIS Web Server for EpicentricFoundation Server SoftwareThis document explains how to configure Microsoft Internet Information Server (IIS) for use with the aservlet engine and Epicentric Foundation Server™ software.

EFS requires the Web server to support JSP 1.0 pages, either natively or through a third-party servlet enginesuch as JRun. Since IIS does not have a native servlet engine, Epicentric recommends that you use JRunwith EFS.

Complete this procedure before running the EFS installer. If JRun is already installed and working, refer tothe Prerequisites for Installing Epicentric Foundation Server Software to review additional prerequisites andrequirements, or refer to Installing Epicentric Foundation Server Software for full installation instructions.

Configuring IISMicrosoft Internet Information Server (IIS) is a Windows-only web server used in conjunction with aservlet engine (for example, JRun), a database (for example, SQL Server), and a Java virtual machine (forexample, the Sun JRE) to support and enable Epicentric Foundation Server.

Before installing EFS, configure IIS (acting as a web server) to process JSP pages in conjuntion with theJRun servlet engine as follows:

1. Install IIS on your platform (per the Microsoft IIS installation instructions), and then stop IIS bydouble-clicking the Services icon in the Control Panel, selecting IIS Admin Service, and clickingStop. Stopping IIS Admin Service should also stop the World Wide Web Publishing Service and theFTP Service; stop these services individually if they are not automatically stopped when IIS AdminService is stopped.

2. If JRun (or other servlet engine) is running, stop it by selecting it within Services, and clicking Stop.3. If IIS had been configured with JRun previously, delete any existing JRun connector files (jrun.dll

or jrun.ini) or any JRun log files (jrunYYMMDD.log) already residing in the IIS scripts directory(typically c:\Inetpub\scripts\).

4. Assuming JRun is to be your servlet engine, you will need to map the file extension .jsp (JavaServerPage files) to the jrun.dll file in the IIS web server scripts directory (typicallyc:\Inetpub\scripts\). (If JRun will not be your servlet engine, check the servlet enginedocumentation to determine how to map index.jsp to the IIS scripts directory.) Use the Windows2000 Control Panel, Administrative Tools, Internet Service Manager icon to open a MicrosoftManagement Console (MMC) expandable hierarchical tree. Expand the tree by clicking on the plussigns, right-click the Default Web Site icon, then choose Properties to access three important tabs: theWeb Site, Home Directory, and Documents tabs (which are all contained in the Default Web SiteProperties dialog window). (On Windows NT, the Home Directory and Documents dialogs are alsoaccessed using Default Web Site, Properties.)

9/12/09 2:53 PMConfiguring the IIS Web Server for JSP

Page 2 of 3file:///Users/shmorhay/Desktop/Bo_Shmorhay_Portfolio/iis.htm

5. Using Web Site, double-check the TCP port number used as the default by the IIS web server(typically 80). This same port number (port 80) will be used by IIS.

6. Using Home Directory,, click Configuration to access the Application Configuration dialog, and thenclick the Add button to access the Add/Edit Application Extension Mapping dialog. In the Extensionfield type the value .jsp.

7. You must supply the full path and file name for the JRun-IIS dynamic linked library file jrun.dll.The file jrun.dll is normally placed in the scripts directory by the JRun connector wizard duringJRun installation, for example, into c:\Inetpub\script\. Browse to this web server scripts directory(c:\Inetpub\Scripts\) and choose the JRun dynamic link library file named jrun.dll, and thenclick the OK button. (If the file jrun.dll is not visible in the Open dialog, double-check that AllFiles is selected, and that system and hidden files are viewable at the operating system level.) A newapplication mapping line for .jsp will be added to the Application Mappings list in the ApplicationConfiguration dialog. Files ending in the extension .jsp will now be processed through jrun.dll byIIS.

8. On the Documents tab of the Default Web Site Properties dialog, click to select Enable DefaultDocument, and then click the Add button to display the Add Default Document dialog in which youspecify a Default Document Name. Note that this dialog is not used to browse to any specific file,rather it is used to specify a default .jsp document filename. Enter the value index.jsp.

9. Select the filename index.jsp from the list of default document filenames and move the filenameindex.jsp to the top of the list. Click the Apply button, and then the OK button to save the filenameindex.jsp as the first (default) document to be processed by IIS.

10. You will now need to stop (and restart) all JRun and IIS services in the correct order. In Windows2000, use the Control Panel, Admin Tools, Services icon and its solid-square Stop toolbar icon to stopthese services in this order: JRun Default Server, then JRun Admin Server, then IIS Admin Server.(Windows NT does not have a Services toolbar, so just use the Stop button.) Stop should stop allthree ancillary services: WWW Publishing, FTP Publishing, and SMTP. If it does not, select and stopeach one individually.

11. Restart the services in the reverse order: IIS Admin Server, then JRun Admin Server, then JRunDefault Server. In Windows 2000, use the solid-triangle Start toolbar icon to restart, but you may stillneed to individually select the WWW Publishing, FTP Publishing, and SMTP services associated withthe IIS Admin Service and restart each of these one at a time, since Start/Restart (the solid-triangleicon) is not as comprehensive as Stop (the solid-square icon).

12. Reboot your machine, and use the Windows 2000 Control Panel, Admin Tools, Services icon tocheck that all of these services are autostarted:

IIS Admin ServiceWWW Publishing ServiceFTP Publishing ServiceSMTP ServiceJRun Admin ServiceJRun Default Service

Testing JSP pagesCheck that the JRun servlet engine is working correctly with the IIS web server by attempting to serve a .jspfile out of the default web directory c:\Inetpub\wwwroot. Use a test file typically namedHelloWorld.jsp.. The code for this test file is:

9/12/09 2:53 PMConfiguring the IIS Web Server for JSP

Page 3 of 3file:///Users/shmorhay/Desktop/Bo_Shmorhay_Portfolio/iis.htm

<% for (int i = 1; i < 10; i++) {%> Hello World <br> <% } %>

and hence HelloWorld.jsp can be created using any text editor, then dropped into the IIS webserverdefault document directory c:\Inetpub\wwwroot. Invoke the HelloWorld.jsp file using the URLhttp://YourHostName/HelloWorld.jsp and you should see nine lines of the phrase "Hello World" printedout by the JRun servlet engine processing the JSP commands through IIS. (This will take a while, since thecode must be compiled, then run.)

Test your JRun configuration as specified in Configuring JRun for Epicentric Foundation Server Software.Once you can successfully run HelloWorld.jsp, this indicates that IIS and JRun are correctly configured towork together to serve JSP pages, and once you have a database (such as SQL Server) available, you will beable to install EFS supported by this configuration.