Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 805
24
Web Servers (PWS, IIS, Apache, Jigsaw)
Fig. 24.1 A Web server communicating with several HTTP clients.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
806 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Web Server PWS IIS Apache Jigsaw
Version 4.0 4.0 1.3.9 2.0.3
Company Microsoft Microsoft Apache Group World Wide Web
Corporation Corporation Consortium
Released 12/4/97 12/4/97 8/20/99 8/17/99
Platforms Windows 95/98, Windows NT UNIX, Windows Windows NT, Win-
Windows NT Server NT, experimen- dows 95/98, UNIX
(Intel/Alpha) tally supports (Solaris 2.x).
Windows 95/98.
Brief Supports up to 10 Latest release of The most popular Java-based server
description concurrent connec- the most popular Web server that provides a
tions; no longer Web server for currently in use on blueprint for future
supports FTP. Windows NT. the Internet. Web development.
Features A great entry-level Updated versions of High performance, Administration
Web server for IIS, Index Server, extremely reliable tools; completely
publishing your Message Queue Web server. object-oriented
own Web pages. Server (MSMQ) design; written
and Transaction entirely in Java.
Server (MTS).
Price Freeware. Packaged Free download Freeware. Freely available
with Microsoft IIS (requires IE 4.01 or under open-source
in NT 4.0 Option later). A CD-ROM license.
Pack, also included version can be
in Windows 98. purchased.
Fig. 24.2 Web servers discussed in this chapter.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 807
Fig. 24.3 Windows NT 4.0 Option Pack license agreement dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
808 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.4 Microsoft Personal Web Server Setup dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 809
Fig. 24.5 Select Network Component Type dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
810 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.6 Select Network Service dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 811
Fig. 24.7 The PWS icon highlighted in the system tray of the Windows taskbar.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
812 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.8 Default Web site page for PWS.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 813
Fig. 24.9 PWS documentation employing use of the ASP scripting engine and the
Web server.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
814 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.10 Microsoft IP Configuration utility.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 815
Fig. 24.11 Network dialog displaying the computer name.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
816 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
File Extension Default Interpreter
.exe, .com, .bat, .cmd Cmd.exe
.idc Httpodbc.dll
.asp, .asa Asp.dll
Fig. 24.12 PWS extension interpreters (Windows 95/98).
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 817
Fig. 24.13 Personal Web Manager dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
818 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.14 Advanced Options area in the Personal Web Manager dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 819
Fig. 24.15 Setting permissions in Personal Web Manager.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
820 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
1 Datasource:NWIND
2 Template:Customers.htx
3 SQLStatement:SELECT * FROM [Customers]
4 Password:
5 Username:
Fig. 24.16 customers.idc file.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 821
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2 <HTML>
3 <HEAD>
4 <META HTTP-EQUIV = "Content-Type"
5 CONTENT = "text/html; charset = windows-1252">
6 <TITLE>Customers</TITLE>
7 </HEAD>
8 <BODY>
9 <TABLE BORDER = 1 BGCOLOR = #ffffff CELLSPACING = 0 RULES = none>
10 <FONT FACE = "MS Sans Serif" COLOR = #000000><CAPTION>
11 <B>Customers</B></CAPTION>
12
13 <THEAD>
14 <TR>
15 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
16 FACE = "MS Sans Serif" COLOR = #000000>CustomerID</FONT></TH>
17 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
18 FACE = "MS Sans Serif" COLOR = #000000>CompanyName</FONT></TH>
19 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
20 FACE = "MS Sans Serif" COLOR = #000000>ContactName</FONT></TH>
21 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
22 FACE = "MS Sans Serif" COLOR = #000000>ContactTitle</FONT></TH>
23 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
24 FACE = "MS Sans Serif" COLOR = #000000>Address</FONT></TH>
25 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
26 FACE = "MS Sans Serif" COLOR = #000000>City</FONT></TH>
27 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
28 FACE = "MS Sans Serif" COLOR = #000000>Region</FONT></TH>
29 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
30 FACE = "MS Sans Serif" COLOR = #000000>PostalCode</FONT></TH>
31 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
32 FACE = "MS Sans Serif" COLOR = #000000>Country</FONT></TH>
33 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
34 FACE = "MS Sans Serif" COLOR = #000000>Phone</FONT></TH>
35 <TH BGCOLOR = #c0c0c0 BORDERCOLOR = #000000><FONT SIZE = 2
36 FACE = "MS Sans Serif" COLOR = #000000>Fax</FONT></TH>
37
38 </TR>
39 </THEAD>
40 <TBODY>
41 <%BeginDetail%>
42 <TR VALIGN = TOP>
43 <TD BORDERCOLOR = #808080><FONT SIZE = 1 FACE = "MS Sans Serif"
44 COLOR = #800000><%CustomerID%><BR></FONT></TD>
45 <TD BORDERCOLOR = #808080><FONT SIZE = 1
46 FACE = "MS Sans Serif" COLOR = #800000><%CompanyName%><BR>
47 </FONT></TD>
48 <TD BORDERCOLOR = #808080><FONT SIZE = 1
49 FACE = "MS Sans Serif" COLOR = #800000><%ContactName%><BR>
50 </FONT></TD>
51 <TD BORDERCOLOR = #808080><FONT SIZE = 1
Fig. 24.17 customers.htx file.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
822 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
52 FACE = "MS Sans Serif"
53 COLOR = #800000><%ContactTitle%><BR></FONT></TD>
54 <TD BORDERCOLOR = #808080><FONT SIZE = 1
55 FACE = "MS Sans Serif" COLOR = #800000><%Address%><BR>
56 </FONT></TD>
57 <TD BORDERCOLOR = #808080><FONT SIZE = 1
58 FACE = "MS Sans Serif" COLOR = #800000><%City%><BR>
59 </FONT></TD>
60 <TD BORDERCOLOR = #808080><FONT SIZE = 1
61 FACE = "MS Sans Serif" COLOR = #800000><%Region%><BR>
62 </FONT></TD>
63 <TD BORDERCOLOR = #808080><FONT SIZE = 1
64 FACE = "MS Sans Serif" COLOR = #800000><%PostalCode%><BR>
65 </FONT></TD>
66 <TD BORDERCOLOR = #808080><FONT SIZE = 1
67 FACE = "MS Sans Serif" COLOR = #800000><%Country%><BR>
68 </FONT></TD>
69 <TD BORDERCOLOR = #808080><FONT SIZE = 1
70 FACE = "MS Sans Serif" COLOR = #800000><%Phone%><BR>
71 </FONT></TD>
72 <TD BORDERCOLOR = #808080><FONT SIZE = 1
73 FACE = "MS Sans Serif" COLOR = #800000><%Fax%><BR>
74 </FONT></TD>
75
76 </TR>
77 <%EndDetail%>
78 </TBODY>
79 <TFOOT></TFOOT>
80 </TABLE>
81 </BODY>
82 </HTML>
Fig. 24.17 customers.htx file.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 823
Fig. 24.18 customers.idc as requested and displayed in a Web browser.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
824 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.19 IIS setup Warning dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 825
Fig. 24.20 Starting the Apache Web Server as a console application.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
826 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.21 Default Web site page for Apache Web Server.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 827
Fig. 24.22 Jigsaw batch installation process.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
828 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.23 Default Web site page for the Jigsaw Web server.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 829
Fig. 24.24 JigAdmin (Jigsaw Administration tool) authorization dialog.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
830 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Fig. 24.25 JigAdmin general properties page.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
Chapter 24 Web Servers (PWS, IIS, Apache, Jigsaw) 831
Fig. 24.26 JigAdmin Web configuration page.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.
832 Web Servers (PWS, IIS, Apache, Jigsaw) Chapter 24
Error Code Description
Bad Request 400 Error in request syntax.
Unauthorized 401 Request requires an Authorization: field, and the client did not pro-
vide one. This response is accompanied by a list of acceptable
authorization schemes use WWW-Authenticate response headers.
Error 401 can be part of a client/server dialogue to negotiate encryp-
tion and user-authentication schemes.
Payment Required 402 The requested operation costs money, and the client did not specify
a valid ChargeTo field.
Forbidden 403 Request for forbidden resource denied.
Not found 404 Requested resource not found.
Internal Error 500 The server has encountered an internal error and cannot continue
processing the request.
Not implemented 501 Request acceptable but denied because server does not support this
transaction method.
Fig. 24.27 Common numeric error status codes.
© Copyright 2000 by Prentice Hall. All Rights Reserved.
For use only by instructors in classes for which Java How to Program, Third Edition is the required textbook.