by February 5, 2002 0 comments



Server-side scrip-ting languages are used to display dynamic contents, send
e-mail, interface with databases, and implement e-commerce logic. Apart from ASP
which works out-of-box on IIS, the four most commonly used are JSP (Java Server
Pages), PHP and Perl. We used Windows 2000 Server running IIS 5. In our case,
Windows is installed in C:\ in our case and its directory is ‘Winnt’.
Substitute your drive letter and Windows directory name wherever applicable.

Set up JSP
JSP brings the power of Java programming to server side scripting. First
install the latest Java Development Kit (PCQuest September 2001 CD). Start the
Tomcat installer through the section Developer>Tools on this month’s
CD’s. From the ‘Installation Options’, select ‘NT service’ to install
Tomcat as a service. When prompted for location to install Tomcat, enter
‘c:\tomcat’. Copy the files named uriworkermap.properties and
worker.properties from the directory cdrom\dev\scripting engines\jsp on the CD
to c:\tomcat\conf. If Tomcat or JDK are installed in different directories from
c:\tomcat and c:\jdk1.4, you must change the following lines in
worker.properties file using Notepad:

worker.tomcat_home=c:\tomcat
worker.java_home=c:\jdk1.4

Copy the file isapi_redirect.dll found in the former directory to
c:\tomcat\bin. If Tomcat is installed in c:\tomcat, double-click on the file
iis_redirect.reg found in the same directory and click on yes to add the
information to the registry. Else copy the file to the hard disk, open it in
Notepad and substitute the occurrences of c:\\tomcat with your path. You must
use two backslashes while specifying the path.

Now launch ‘Internet Service Manager’ applet in Control Panel>
Administrative Tools. Right-click on the computer name (labeled with a computer
icon) and select Properties. In the Internet Information Services tab, click the
Edit button in the Master Properties section. Click on ‘ISAPI Filters’ and
then on Add. Type jakarta for the filter name and for the executable type
c:\tomcat\nin\ isapi_redirect.dll. Return to the main window, by pressing OKs to
save the settings. Right-click on the Default Web Site that will show by
clicking on the ‘+’ icon besides the computer name. Select New> Virtual
directory. Enter jakarta as the alias and for the directory type c:\tomcat\bin.
In the Access Permissions window, check the item labeled ‘Execute (such as
ISAPI applications or CGI)’. Restart IIS Web server by right-clicking on the
computer name and selecting Restart IIS. Open the file server.xml found in
c:\tomcat\ conf and uncomment the line:

<Connector className=”org.apache.ajp.tomcat4.Ajp13Connector”
port=”8009” minProcessors=”5” maxProcessors=”75”
acceptCount=”10” debug=”0”/>

by removing the surrounding <!– and –> marks. Restart Windows.

Create a file ‘test.jsp’ in the directory c:\tomcat\webapps\ examples\jsp
and type the following contents.

<%out.println(“JSP works on IIS”);%>

Start Internet Explorer on the same machine and enter
‘http://127.0.0.1/examples/jsp/test.jsp’. You will be shown a Web page
saying:

JSP works with IIS
Henceforth you can test your JSPs by placing them in the above mentioned
directory.

No Comments so far

Jump into a conversation

No Comments Yet!

You can be the one to start a conversation.

Your data will be safe!Your e-mail address will not be published. Also other data will not be shared with third person.