Chapter 7

Installing and Configuring the Lotus Notes Web Publishing Products


CONTENTS

Good management is the key to a successful Web site. The most visually stimulating, graphically intense, professionally designed pages on a Web site only have effect on the very first visit. After that, you need to keep people coming back. For electronic commerce, you need to provide visitors with new information, presented in new ways. On a company Intranet, you need to keep your information current. This is accomplished through constant creation and updating of content, directories, templates, forms, and information. The Lotus Web publishing products, either separately or in tandem, can streamline the management of your Web site, and harness the powerful synergy that exists between Lotus Notes and Web technology.

Interactivity is the future of the Web. Most Web sites now only publish static information and maybe permit browsers to submit responses or requests in the form of e-mail. This is only the beginning of what Web technology can do for us. These Lotus products make Notes interactive applications available to Web users. They provide today what most products can only promise in the future.

In this chapter, we will introduce you to the two Lotus Notes Web publishing products, InterNotes Web Publisher and Domino Web Server. If you already have Lotus Notes in your organization, this will be very useful information to you. If you're not yet familiar with Notes, read the section on Lotus Notes in chapter 18, "Groupware Applications." There, we have described Notes and its various Internet connectivity tools.

In this chapter, you will learn the following:

The Lotus Notes Web Publishing Products

The InterNotes Web Publisher is a set of tools that permits the periodic conversion of views, forms, and documents in Lotus Notes databases into HTML formatted files stored on an HTTP server.

The Domino Web Server is a Lotus Notes server process that incorporates the HTTP and HTML protocols into Notes, effectively making Notes a combination Notes server and Web server, all rolled up into one product.

The products are similar in intent and effect. Both products are add-ons to the basic Notes server. Both products make it possible for you to publish the contents of Notes databases to the company Intranet as HTML documents for viewing with a Web browser.

The InterNotes Web Publisher permits you to convert the contents of any Notes database into a series of linked HTML documents. It also permits a person browsing through those documents to enter search requests and fill in forms. The Notes server will execute any search request and return the results as a linked list of HTML pages. Forms filled in on the Web are converted to Notes documents in the original Notes database. You can republish these new documents as HTML pages. And the arrival of a filled-in form in the Notes database can trigger all sorts of automated workflows. For example, if the submitted form was an enrollment in a training session, its arrival in the database might cause Notes to send an e-mail to the enrollee's manager requesting approval for the enrollment.

There are two key points here. First, InterNotes Web Publisher will publish Notes databases and, as they change, republish the changes. In this process, Notes automatically maintains document links for you. Second, InterNotes Web Publisher accepts queries and form submissions from a Web browser. This permits non-Notes users to participate in Notes workflow applications.

The Domino Web Server does everything InterNotes Web Publisher does, as described previously. However, it works differently than InterNotes Web Publisher. To use InterNotes Web Publisher you have to marry your InterNotes server (the Notes server running InterNotes Web Publisher) to a third-party HTTP server. InterNotes Web Publisher publishes Notes databases by dumping HTML pages into one or more of the HTTP server's directories of HTML documents, and then updating those documents periodically.

The Domino Web Server, on the other hand, does away with the third-party HTTP server and the periodic, scheduled updating of HTML documents under that server's control. Rather, Domino turns your Notes server into a combination Notes/HTTP server. Domino effectively incorporates HTTP and HTML into your Notes server, so that they are now native Notes protocols. As a result, your Web browser can now work directly with your Notes server and participate directly in Notes workflow applications. To put it another way, it makes Notes the world's first Internet application server.

Say you're surfing around with your Web browser. You want to browse a Notes database on a Domino server called (forgive us) DomiNotes. The server appears to you as simply another HTTP server. Its host name, to you, is dominotes.companyname.com. You send your query. DomiNotes replies directly, sending you a list of available databases, or views in a database, or a document, depending on how it is configured and on what you asked for in your query. You sent your query via HTTP. Notes replied in HTTP, converting its database views or documents to HTML on the fly.

At this point, you might ask why are there two products. Well, Domino is really the successor to InterNotes Web Publisher. We suspect that it will eventually replace InterNotes Web Publisher entirely.

But InterNotes Web Publisher is a mature product. Domino is not. Lotus first released InterNotes Web Publisher in May 1995. They upgraded it in November 1995, and again in March 1996.

In December 1995, Lotus announced its intention to eventually incorporate HTTP, HTML, and other Internet protocols into Notes. Domino, initially released in July 1996, is the first fruit of that initiative. It is in release 1. It will be a while before it matures. In the meantime, you may prefer to stay with InterNotes Web Publisher, especially if you already have third-party Web servers in place.

For the time being, each product can do things that the other cannot. Your needs and goals will determine which tool is better for you. You may decide to use one, the other, or both.

Notes and Your Intranet

Notes and InterNotes Web Publisher or Notes and the Domino Web Server can make your company Intranet a truly powerful management tool. To understand how, it might help to step back and look at the current and future benefits of your company Intranet. In this case, we're interested in the HTTP/HTML portion of your Intranet, your "Company Wide Web."

The original and still primary benefit of Web technology is the elegant and inexpensive way it provides for disseminating information far and wide. Management can use it to publish all sorts of important information to its employees. For example, suppose your company training department wants to publish its course offerings and class schedules to the rest of the company. They could distribute it on paper and post it on non-computerized bulletin boards. They could flood the network with e-mail. Or they could publish it on the Company Wide Web, making it widely and conveniently available to anyone with a connection to the network and a Web browser.

The mere publishing of the course schedule solves only one of many problems for the training department. Employees still need to call the training department to enroll in class, find out more about class content, or request an approval form for their manager to sign. A really effective Company Wide Web would allow for interactivity-with online registration, automatic notification of enrollment acceptance, automatic mailing of approval forms, and up-to-the-minute details of class enrollment. A really useful Web application would publish information stored in back-end databases to the Web, and would receive information entered in the Web browser back into the back-end databases for further processing.

While it's possible to marry Web technology to other programs in this way, it's no trivial undertaking. It requires some pretty long-haired programming in one or more database languages as well as one or more scripting languages such as CGI, SSI, and PERL.

Furthermore, while cheap and widely available Web browsers make retrieving information on the Internet/Intranet wonderfully easy, publishing that information and managing a Web site full of interconnected pages is a major undertaking. Someone has to create all those HTML documents. Someone has to maintain all the links between those documents. Doing these things by hand quickly approaches impossibility as a Web site grows beyond a couple dozen pages.

There are many tools available to help you code links to back-end databases, to automate the creation of HTML documents, and to manage a Web site full of interlinked documents. Some tools are described elsewhere in this book. Some are cheap and adequate. Others are expensive and elegant. Most require that you have some degree of expertise in HTML, CGI, and maybe other scripting languages. Lotus Notes does the whole job for you, and it does it elegantly, at low cost, and without CGI programming on your part.

The InterNotes Web Publisher

The InterNotes Web Publisher will automatically convert Notes databases into a series of HTML documents, then place those documents into one or more directories under the control of a Web server, so that they are accessible to Web browsers. The InterNotes Web Publisher is designed to make Web publishing less expensive and easier than ever before. InterNotes Web Publisher manages your Web site, taking care of the complex creation, maintenance and linking of documents.

System Requirements

There are two versions of InterNotes Web Publisher:

InterNotes Web Publisher 2.1 runs on the following Notes platforms:

InterNotes Web Publisher 4.0 runs on the following Notes platforms:

The InterNotes Web Publisher resides on the same server as Lotus Notes, the system requirements are the same as for Lotus Notes, except that extra memory is required. Lotus may release InterNotes Web Publisher for other platforms after we write this. You can get the most up-to-date information from Lotus' Web site (www.lotus.com).

Hardware

InterNotes Web Publisher runs on whatever hardware platform its underlying operating system runs on, which may include an Intel" 80486 or greater microprocessor (33MHz or higher) or a RISC-based processor. In addition to the basic memory requirements of the underlying Notes server, Lotus recommends the following additional server memory to accommodate InterNotes Web Publisher:

Also, you should reserve, say, 100 megabytes of hard disk space for Notes program and basic data files and InterNotes Web Publisher files. Add to that whatever disk space your HTTP server requires and lots of disk space for Notes databases (which are not compact) and your HTML file system. Lotus recommends at least 1 gigabyte of disk space for a basic InterNotes Web Publisher installation.

Network Requirements

Notes operates in virtually any local area network environment. It works with all of the common network protocols including TCP/IP, IPX/SPX, NetBEUI, NetBIOS, Banyan Vines, and AppleTalk. However, InterNotes Web Publisher must be able to communicate with at least one HTTP server. Therefore, the Notes server on which InterNotes Web Publisher resides must use the TCP/IP protocol. Notes can work with the following implementations of TCP/IP:

Software

InterNotes Web Publisher 2.1 (for Lotus Notes 3.x) requires Windows NT Advanced Server version 3.1 or later, and Lotus Notes server for Windows NT version 3.2 or later. It requires OS/2 version 3.0 or later, and Notes Server for OS/2 version 3.31 or later.

For this book, we ran on an NEC PowerMate V100 with a 100mHz Pentium processor, 80 megabytes of RAM, and a 1 gigabyte hard disk drive. We ran InterNotes Web Publisher version 4.0, first with Lotus Notes 4.0, later with Lotus Notes 4.1, both on Windows NT 3.51 (Service Pack 3). We ran it with both the Microsoft Internet Information Server release 1.0 (which is a combined HTTP, FTP, and Gopher server) and the beta 2 release of the Netscape FastTrack HTTP server.

We had difficulty getting the HTTP servers to run properly until we removed Novell's NetWare Directory Service client from the computer. We also had difficulty configuring the InterNotes Web Publisher to work properly with the Microsoft Internet Information Server, and had to seek help on the Lotus InterNotes Web site to solve our problems. Considering how many HTTP servers there are in the world, it is understandable that Lotus could not document the details of running InterNotes Web Publisher with every one of them. Be prepared to seek help on the Lotus Web site (www.lotus.com) if you cannot get InterNotes Web Publisher to work with your HTTP server. Lotus hosts a discussion there in which you can seek answers to your questions about InterNotes Web Publisher.

TIP
To get InterNotes Web Publisher 4.0 to work with the Microsoft Internet Information Server 1.0 under Windows NT 3.51, set the following variable in the Windows Registry:
In HKEY_LOCAL_MACHINE under the subkey:
        \SYSTEM
        \CurrentControlSet
        \Services
        \W3SVC
        \Parameters
Add the following value:
        Value Name:        CreateProcessAsUser
        Data Type:          REG_DWORD
        Value:               0

Configuring Your Site

To set up Lotus InterNotes Web Publisher, you must have both a Lotus Notes server and an HTTP server. You can run both servers on the same computer or on separate computers. These two computers must be able to communicate with each other on a TCP/IP network.

You lose the interactivity features (form inputs and full text searches) if both servers are not on the same computer. Therefore, we recommend that you run your Notes server, InterNotes Web Publisher, and your HTTP server all on one computer, as illustrated in figure 7.1.

Figure 7.1 : This diagram illustrates two possible InterNotes Web Publisher site configurations, using either two computers or one.

The Lotus Notes server is actually a group of programs that share memory space on the computer and work cooperatively with one another. The mix of programs that constitute a given Notes server varies according to the tasks it must perform. For example, one Notes server may act as a gateway to other mail systems and so would run mail gateway software that other Notes servers would have no need to run. The other Notes servers, when they have mail to deliver outside Notes' mail system, would simply deliver it to the gateway server.

A Lotus InterNotes server is itself a gateway server. It transfers information back and forth between the Notes domain and the Web server with which it is paired. The InterNotes Web Publisher program runs on the Notes server as a Notes server add-in program. InterNotes Web Publisher consists of a publishing module, an interactivity module, a CGI script, a configuration database, a log database, a help database, and miscellaneous supporting files and databases.

The two modules are executable programs. Along with the CGI script, they do the actual work of converting and passing information back and forth between Notes and HTTP servers. They refer to documents in the configuration database to determine precisely how to do their jobs. And all of their activities are recorded in the log database.

The publishing and interactivity modules reside on disk in the Notes program directory and in memory with the other Notes server modules. The CGI script resides in the HTTP server's designated CGI script directory, and the HTTP server pulls it into memory as needed. The actual filenames of these files vary to conform with the underlying operating system.

The publishing module is the main server add-in program that actually converts Notes databases to HTML files and puts them in the HTTP server's output directory. The interactivity module works with the CGI script to convert information entered into search fields and forms by Web surfers into queries of and documents in Notes databases. (See figure 7.2.)

Figure 7.2 : Webpub converts Notes data to HTML and delivers it to the HTTP server. The HTTP server uses the inotes CGI script to deliver user input to the Notes server, where inotes converts it back into Notes format.

You configure these programs in a Notes database called the Web Publisher Configuration database. One of the documents in this database is the WebMaster Options document. Here, you set global variables that affect all of your published databases. For each published database, there is also a Database Publishing Record document that defines the "local" variables of the publication of that database.

Installing InterNotes Web Publisher

The precise details of installing InterNotes Web Publisher vary depending on the underlying operating system. Lotus provides detailed installation instructions with the software. In all cases, you will accomplish the following steps:

  1. Run the install program, which may prompt you for information and will install the InterNotes Web Publisher program files and CGI script in the Notes program directory and the InterNotes Web Publisher databases in the Notes data directory. You may have to tell the install program the names of these directories.
  2. If the HTTP server resides on the same computer as the Notes server, copy the InterNotes CGI script from the Notes program directory to your HTTP server's designated script directory. The Windows install process will do this for you. On the other platforms you will have to do this yourself.
  3. Add the InterNotes Web Publisher databases to the workspaces of the Notes clients from which you will administer the Notes server.

Starting InterNotes Web Publisher

To start InterNotes Web Publisher manually, enter commands at the Notes server console. To start the publishing module, type load webpub. To start the interactivity module, type load inotes.

To cause InterNotes Web Publisher to start automatically whenever you start the Notes server, edit the SERVERTASKS variable in the Notes initialization file, NOTES.INI. You can either edit the file directly or use the SET CONFIGURATION command at the Notes server console. In either case, you want to add the variables webpub and inotes to the list of variables already there. For example, if the line currently reads:

SERVERTASKS=Replica,Router,Update,Stats,Amgr,Adminp

you will edit it to read:

SERVERTASKS=Replica,Router,Update,Stats,Amgr,Adminp,Webpub,Inotes

You may want to load multiple instances of the interactivity module into memory. Each instance of it can handle only one request at a time. If you anticipate heavy usage of the search or form fill-in features of InterNotes Web Publisher, loading multiple copies of the interactivity module in memory will allow your site to process multiple requests simultaneously. To load multiple copies manually, just enter the load inotes command once for each instance of it. To set up Notes to load multiple instances automatically whenever the server starts up, edit the SERVERTASKS variable so that it looks something like this:

SERVERTASKS=Replica,Router,Update,Stats,Amgr,Adminp,Webpub,Inotes,Inotes,Inotes 

Each instance of the interactivity module occupies about 2.5 megabytes of RAM.

When the publishing module starts, it looks in the root Notes data directory for the Web Publisher Configuration database. It looks for it under the default filename of webcfg.nsf. If you want to store the file in another data directory or you want to give it a different filename, you must add a variable to the NOTES.INI file, such as follows:

webpubcfg=path\filename

where path is the partial path, starting at the root Notes data directory, to the subdirectory in which the database will reside, and filename is the alternate filename of the Web Publisher Configuration database.

Stopping InterNotes Web Publisher

To stop InterNotes Web Publisher manually, enter commands at the server console. To stop the publishing module:

tell webpub quit

To stop the interactivity module:

tell inotes quit
NOTE
One instance of the tell inotes quit command will stop all instances of the interactivity module currently in memory.

To stop InterNotes Web Publisher from starting automatically when the Notes server starts, remove the variables webpub and inotes from the SERVERTASKS variable in NOTES.INI.

You can also disable publishing of databases without stopping InterNotes Web Publisher. To disable publishing of all databases, set the Publishing Enabled field to Disabled in the WebMaster Options document in the Web Publisher Configuration database. To disable publishing of any one database, set the Publishing Status field to Disable in the Database Publishing Record for that database in the Web Publisher Configuration database.

Understanding HTML Output Directories

Notes doesn't do all of your Web site management for you. You still get to use some of the skills you learned elsewhere in this book. For example, if you publish multiple Notes databases, you have to link them to one another manually. Also, if you want to integrate Notes-published pages into a preexisting Web site, already occupied by non-Notes-generated pages, you have to take measures to ensure that the Notes-generated pages don't overwrite the non-Notes pages, especially the site home page. You also need to link your non-Notes home page to your Notes database home pages.

When you configure your Web server, you typically specify a directory as the root directory of your Web site. Depending on which brand of Web server you are running, this may be called \HTTP or \WWWROOT. Your site home page resides here, and has a file name that your Web server will look for whenever anyone requests your site home page. The file may be called INDEX.HTM or DEFAULT.HTM or something equally as clever and original. Your site home page will have links embedded in it that will lead eventually to every other publicly available page in your site, as well as to pages at other sites. And the pages on your site will typically reside in subdirectories of the site root directory. Thus, the structure of your site might look something like what's shown in figure 7.3.

Figure 7.3 : This diagram illustrates the data directory structure of an HTTP server in which all HTML pages are derived from Lotus Notes databases.

When you configure your InterNotes server, you have to go through the same exercise. That is, you have to specify an output directory for the HTML files that Notes will generate. You have to specify a filename for your Notes home pages, that is, for each published Notes database's home page. You do these things in Notes, in the WebMaster Options document in the Web Publisher Configuration database (see figure 7.4).

Figure 7.4 : The WebMaster Options document tells Notes where to put its HTML output, how to name its HTML output files, and where to look for the inotes CGI script.

When you publish each Notes database, you have the opportunity to designate it as the "Home Page Database". You may designate the home page of any one Notes-published database as either the site home page, from which all public documents on the site can be reached, or as the home page from which all other Notes home pages can be reached. If you only generate pages with InterNotes Web Publisher, your site directory structure will look something like figure 7.3.

Alternately, if you're adding Notes-generated pages to an established Web site, your site directory structure might look like figure 7.5.

Figure 7.5 : Here, only some HTML pages are derived from Lotus Notes databases. In this diagram, Notes-derived pages occupy directories branching off from the "NOTES" directory.

To set this up, you would configure your Web and InterNotes servers to recognize a subdirectory of your site root directory as the output directory for your Notes HTML pages. You would designate one Notes database (and only one Notes database) as the Home Page Database. When InterNotes publishes the database, InterNotes creates a subdirectory for each database beneath the InterNotes output directory. Then, with one exception, it publishes all pages for each database into that database's designated subdirectory. The one exception is the home page for the Home Page Database; it alone would reside in the main Notes output directory.

You would have to craft a pointer from your site home page to the home page of the Notes Home Page Database. And you would have to create pointers from the Notes Home Page Database's home page to the home pages of all your other Notes home pages. (Beam us home, Scotty!)

You can insert links by hand in Notes documents or Notes forms in several ways, all of them illustrated in figures 7.6 and 7.7.

Figure 7.6 : This figure shows a form in Notes in design mode. It includes four examples of the same URL: a DocLink, a text URL, a graphic URL, and a hotspot link URL.

Figure 7.7 : This figure shows how the examples in figure 7.6 appear in a Web browser.

All the examples in figure 7.6 include the word "Home," which is descriptive, intended to tell the reader what document this URL will return. The notation "[/]" is the URL; it points to the home page of the current Web server. The Properties Infobox shows the URL for the hotspot link. Figure 7.7 shows how each of these references appears from within a Web browser.

First, you can insert standard Notes DocLinks. In Notes Release 3, you can only link Notes documents to one another this way. Beginning in Release 4, you can link Notes documents to other Notes documents, Notes views, or other Notes databases. Notes 4 also allows you to insert hotspots, which act like DocLinks but look like highlighted text, a graphic image, or maybe a button.

Second, you can insert URL references into Notes documents. These can link to any page in your site, to a Notes view, or to another Web site. You can do this either as a text link or a graphic link. To create a text link, underline a block of text, then insert the URL reference, enclosed in square brackets, immediately following the underlined text. To create a graphic link, embed a graphic image in your Notes document, followed by the URL reference enclosed in square brackets. Figure 7.6 shows how text links and graphic links appear in a Notes form in design mode. Figure 7.7 shows how they appear in a Web browser.

Third, in Notes 4.x, you can create a hotspot link in a Notes document or form. In a form in design mode, or in a rich text field of a document in edit mode, enter a block of text and select it. Then, in the menu, choose Create, Hotspot, Text Popup. A box appears around the selected text and an Infobox appears, called Properties for hotspot Pop-up. On the first tabbed page of the Infobox, in the Popup text field, enter the URL surrounded by square brackets (refer to figure 7.6).

An Example Notes Application

Using the example of our training department, we're going to walk you through a typical Notes application. Once we explain the application and how it works in Notes, we'll show you what happens when we publish that application through the InterNotes Web Publisher to our Company Wide Web.

Our training department maintains its class schedule in a Notes database (see figure 7.8). When an employee telephones the department to inquire about a class, the training department employee looks up the information in a Notes database.

Figure 7.8 : The Training Department database, as seen in Notes, with a list of views on the left and a view of available classes on the right.

If the caller then decides to enroll in the class, the training department employee fills in a Notes form and stores it in the Notes database (see figure 7.9).

Figure 7.9 : Lotus Notes displays the database enrollment form in edit mode. Corner brackets surround fields where the user enters data. No brackets surround fields completed automatically by Notes.

Upon completion of the enrollment form, the training department employee can see the enrollee listed in the Notes view (see figure 7.10).

Figure 7.10: Lotus Notes now displays the name of the new enrollee in the Application Development class.

Notes provides views for seeing collections of documents. Notes views look like tables you see in a relational database. Each document constitutes one row of the view. Each column conveys specific information about the document, culled from one or more of the fields. A given database usually has multiple views. In our example, we can view classes by course date, by event, or by course description.

Our example training department application works well, is efficient, and takes little time to learn to navigate. But there's a catch. Any person in our organization who needs to see or retrieve information from our Notes database must have Lotus Notes installed. Or we must Web-enable the database.

Publishing Our Notes Application

How can we benefit from the publication of this database to our Company Wide Web? Well, employees can see the class schedule without having to telephone our training department. Employees can enroll themselves into a class. The database might even be configured to mail a reminder to the employee two days before the class. InterNotes Web Publisher expands our Lotus Notes applications to our employees without our needing to install Notes Desktop licenses.

How would this work? Both Lotus Notes and the World Wide Web consist of server computers and client computers. In both systems, the servers store documents in a particular format and deliver them on request, via a particular delivery system, to the clients. Web servers store files in HTML format and deliver them via the delivery system known as HTTP, which depends on TCP/IP as its underlying LAN protocol. Notes stores documents in Notes databases and delivers them on request via the underlying LAN protocols.

In both cases, the client programs then display those documents as formatted text with various objects embedded in them, such as files, graphic images, sound clips, and video clips. The authors of HTML documents and the managers of the servers upon which they are stored can link the documents together, using hypertext links. Doing so allows readers to jump easily from one document to another by activating the hypertext links. Notes documents can also be linked to one another and to external objects, using a series of tools built into Notes.

You can publish Notes databases to the Web in one of two ways: the quick and dirty way, or the "embellished" way. With the quick and dirty way, you publish a database "as is." You need only to create a Database Publishing Record document in the Web Publisher Configuration database, as shown in figure 7.11. This document instructs Notes to publish the database and defines such details as how and when the HTML version will be refreshed from the Notes version, and which parts of the database will be published.

Figure 7.11: The InterNotes Web Publisher Database Publishing Record, displayed here by Lotus Notes Release 4, governs how and when a Notes database is published to the Web.

When you save the Database Publishing Record, the Web publisher program creates a series of linked HTML pages from the views and documents in the database. It then copies those pages to the designated subdirectory on the Web server. The "About[database name]" document will (unless you changed the defaults) become the home page, and links to the published views will be embedded in it. The views will become lists of documents, with links to each document associated with its name in the list. Each listed document will become a separate HTML page, and any Notes hypertext links (known as DocLinks) will become HTML-style hypertext links.

Let's look again at our Training Department application. This time, we'll look with a Web browser on our Company Wide Web. As employees open their browser, they are greeted with the company home page shown in figure 7.12.

Figure 7.12: The Company Wide Web home page is displayed here in Microsoft Internet Explorer, a Web browser. This page originated as the "About [database name]" document in a Lotus Notes database.

Every database that you publish with the InterNotes Web Publisher has a home page. By default, the home page is a list of all the views in the database, with links to each view. The home page automatically supports navigation of published files through Web browsers.

You'll want a home page for your entire site. On this site home page, you can add links to the database home page document of every database you publish. You can tell the InterNotes Web Publisher which of your home pages is the home page for the entire site. (Got that? Beam us home, Scotty!)

From the site database home page, we navigate to the Training Department home page (see figure 7.13).

Figure 7.13: The Training Department home page is displayed here in a Web browser.

TIP
Since HTML does not support alignment settings, everything in your document will be left aligned by default. To have items appear side-by-side in the published version of your document, enter the items in a Notes table. HTML will preserve alignments in tables.

We used an image map in our database home page. Here are the steps we took:

  1. Create a graphic and save it as a bitmap.
  2. Copy it to the clipboard.
  3. Open your database, and choose Create, Design, Navigator.
  4. Paste the graphic by Create, Graphic Background.
  5. Define hotspots by selecting Create, Hotspot (rectangle or polygon).
  6. Click a Run option in the design pane and assign the action for each hotspot.
  7. Close and Save the navigator.
  8. Create a Notes form that will contain your navigator.
  9. Add the navigator to the Notes form as a field named $$ImageMapBody. Choose text as the field type.
  10. On the Options tab, enter the name of the navigator in the Help description box.
  11. Close and save the form.
  12. Publish your database and view it through a Web navigator.

You may want to add some other fields to your home page, as listed in Table 7.1.

Table 7.1  Additional Fields for Home Page
$$AboutDatabaseInstructs the Web Publisher to include the contents of your database About Database document on the home page
$$ViewListInstructs the Web Publisher to include a list of all of the database views on the home page, and create links from each view name to the corresponding view
$$ViewBodyInstructs the Web Publisher to include a specific database view on the home page, and create a link from each document name in the view to the corresponding document
$$ImageMapBodyInstructs the Web Publisher to include a specific image map on the page

Because our page incorporates a search bar, it originated as a Notes form designed specifically to be published on the Web. If we did not need the search bar, we could have simply used a standard Notes document, the "About Class Registration" document, of the "Class Registration" Notes database.

Now we can take a look at the course offerings by clicking the hypertext, "Course Offerings" (see figure 7.14). This hypertext was created with a Notes Hotspot.

Figure 7.14: The course listing is displayed in a Web browser. This page originated as a view in the Training Department's "Class Registration" Notes database.

We are interested in App Dev 1. Clicking its URL takes us to a document that describes the course in detail (see figure 7.15).

Figure 7.15: A document describing a course is displayed in the Web browser.

This page originated as a document in the Training Department's "Class Registration" Notes database. If we want to enroll, we can click the "See Schedule" URL to find out when the course is scheduled.

If we want to enroll in the course, we can click the "See Schedule" icon. A list of courses and their scheduled times appears as shown in figure 7.16.

Figure 7.16: This list shows the dates, times, and locations of the offered courses.

If we click the URL for one of the scheduled dates, the Class Registration Form appears (see figure 7.17).

Figure 7.17: The Class Registration Form is displayed here.

This form originated as a form in the Training Department's "Class Registration" Notes database. When the enrollee submits the form, it will generate a document in the Notes database. If we desire, it can also be published back to the Web.

As you can see, our Notes databases look very much like they did when we viewed them in Notes, and Notes doesn't care which Web browser you use.

A Snapshot of Publishing with InterNotes

In the preceding example, when the database was published, InterNotes did the following:

Searching Notes Databases from Within a Web Browser

Lotus Notes, being a repository of information, naturally comes with a lot of tools intended to make it easy to find the information you need. One of the most powerful is its full text search engine. To enable it, you have to create a full text index of the database to be searched. You create the index by selecting options in the Notes menu or, in Notes Release 4, by selecting an option when you create the database. After you have created the index, you can use Boolean search terms ("x and y", "x or y", and so on) to search for any text string that appears anywhere in any document in the indexed database.

InterNotes Web Publisher extends this powerful tool out to the Web. You can insert a search bar into a Notes-generated home page or view page. A user who brings up the page in his or her browser can enter a search string into the text field in the search bar, then click the Search button (see figure 7.18).

Figure 7.18: This is the Training Department home page, as seen in a Web browser. Note the search input field.

InterNotes Web Publisher conveys the search string to the Notes server, which performs the search. InterNotes Web Publisher takes the search results and displays them to the user as a linked list of HTML documents. Those having the most "hits" appear at the top of the list. Click the link for any document to display it in the usual fashion.

This search bar was embedded in our Notes form by adding a field to a form call $$ViewSearchBar, as shown in figure 7.19. The Notes Help Description of this field is the name of the Notes view we wish to search.

Figure 7.19: This is a Notes document in design mode, displaying the search bar field ($$ViewSearchBar), which becomes the search input field illustrated in figure 7.18.

Building Interactive Web Applications with Notes Forms

As you can see, Notes users use Notes forms as templates to create new documents. InterNotes Web Publisher permits the WebMaster to publish Notes forms as HTML forms that people can fill out in their browsers. When a user clicks the Submit button on the form, InterNotes Web Publisher submits the form to the Notes server, which then stores the form in a Notes database as a standard Notes document. If you don't create a Submit button on the form, InterNotes Web Publisher automatically creates it for you.

What Notes does with that document next is solely up to the Notes database designer. The document might be republished as yet another HTML document, now available for anyone to view in their browser. Or it might be internally processed by Notes and become part of a workflow in the everyday business of the company. Either way, the WebMaster has just extended Notes functionality to non-Notes users, either in the form of a Web-based discussion database, or as a Notes workflow application.

WebYou can also capture information from Web users by adding CGI environment variables to Notes response form fields. When the user submits the form, INOTES.EXE populates the fields with the appropriate information, which can then be used by Notes to process the response.

Adding HTML Code

You might have existing HTML files that you want to display on your Intranet, or you may want to apply HTML attributes and formats that are not available in Notes. To do so, you have two choices:

To store HTML pages in your Notes document, you can paste them into a special field, a rich text field which you have named "html." When the Web Publisher publishes the document, it creates a separate HTML file containing the output of the HTML code. This page will display as a separate page on your Web.

To include HTML code in a Notes document, you can enter the HTML instructions on the form or in a rich text field in a document. You can also create and apply a paragraph style named HTML. Either way, the syntax for HTML code is:

<html code>

where html code is the HTML instruction you want to include. For example:

<center>

Some Notes formatting is not converted or supported by HTML. Table 7.2 lists some of those features.

Table 7.2  Notes Formatting Features Not Supported by Nor Converted to HTML
Text SizeUse Paragraph Styles in Notes or map fonts through fields in the Database Publishing Record
AlignmentHTML displays all text and graphics left aligned, unless placed in a table
BordersThe top left cell of the table determines if the table will have cell borders. If the top left cell has no border, the entire table will have no border. If the top left cell has a border, the entire table will have a border
Column WidthsColumn widths will be sized to the column's widest entry
Font and styleRich test attributes are not supported, except
attributesbold and italics
ButtonsThe Web Publisher will not translate buttons

The Lotus Domino Web Server

In July 1996, Lotus released the Domino Web Server, which is a Notes server task that effectively makes the Notes server an HTTP server or, in Lotus's words, an Internet application server. It incorporates six Internet protocols right into the Notes server: HTTP, HTML, URL syntax, CGI, MIME encoding for the Web, and SSL. It also supports Java and Javascript. Lotus promises to support future Internet protocols as they emerge, including fast CGI, ISAPI, and NSAPI.

System Requirements

Unlike InterNotes Web Publisher, Domino only works with Notes Release 4. If you are still using Notes Release 3, you can only use InterNotes Web Publisher.

The initial release of Domino runs only on the Windows NT platform. Lotus is actively developing it for Solaris, AIX, and HP/UX as well.

The system requirements for Domino are the same as for the Lotus Notes server, except that Lotus recommends more RAM than the Notes server would otherwise require. Lotus normally recommends 48 megabytes of RAM under Windows NT, but recommends 64 megabytes of RAM when running Domino.

Also, the server must be running the TCP/IP suite.

Domino, like InterNotes Web Publisher, runs on the Notes server as a Notes server add-in program. It consists of a server add-in task, nhttp.exe, plus a series of supporting DLL programs

Installing the Lotus Domino Web Server

Domino I, released in July 1996, is an add-in server process downloadable from the Lotus Web site free of charge that must be installed manually. Domino II, a fully integrated Notes/HTTP server announced by Lotus for release in the fall of 1996, will probably automate the install process. The process includes the following steps:

  1. Download the Domino files from the Lotus Web site, www.lotus.com. You actually want to perform at least two downloads. One is the Domino program files. The second is the Domino User's Guide, which is a Notes database covering all aspects of Domino setup, configuration, and use. Optionally, you may want to download whatever sample databases may be currently available, either to adopt them to your own use or to examine for programming ideas.
  2. Shut down the Notes server and client if they are running.
  3. Run the install program, DOMINO.EXE, which is the only file that you receive in the download from Lotus. The InstallShield Wizard prompts you for the locations of the Notes program and data directories, and for the name of the Windows Program Manager group in which it will create program icons. Then, it creates several subdirectories and places executable files and DLLs in the Notes program directory, some databases and templates in the Notes data directory, and some support files in the created subdirectories.
  4. Update the Notes public address book by adding a subform and a field to it. In this step, you actually copy and paste the subform and field from a database template, HTTPCNF.NTF, that comes with Domino, to PUBNAMES.NTF, the template for the Notes public address book. The subform will later show up in the Domino server's server document as a new section called HTTP Server, which includes all the fields necessary to configure the HTTP side of the Notes server. The new field is the HTTP Password field, which will later appear in every Person document. You might want to make backup copies of the public address book and its template before you perform this step.
  5. Refresh the design of the public address book to complete step 3. In step 3, you updated the server and person forms in PUBNAMES.NTF, the template on which the public address book is based. In this step, you update the same forms in NAMES.NSF, the public address book itself.

Configuring and Starting the Lotus Domino Web Server

After you install the Domino Web Server on your Notes server and update, you have to confirm the settings in the HTTP Server section of the server document, then confirm that everything is working properly by starting the server.

The HTTP Server Section of the Server Document

The HTTP Server section of the server document controls the behavior of the HTTP side of the Domino server. It includes default settings for the TCP/IP port number, Home URL, SSL port number and key file, several directories and their mappings, and various other server settings. You may not need to change any settings, but you should review them to make sure. The HTTP Server section of the server document, with its default settings, appears in figure 7.20.

Figure 7.20: The HTTP Server section of the server document, shown here with its default settings, controls the behavior of the HTTP side of the Domino Server.

Settings that you might especially want to change include the Host Name, DNS Lookup, Home URL, and the Logging fields. The Host Name field starts out blank, which means that your server will answer to whatever name appears in its TCP/IP stack. Alternately, you could enter the host name or an alias name that is registered with the computer's Domain Name Server, or its IP address. If Web browsers cannot find this server after you start it up, you may need to change the entry in this field.

Use the DNS Lookup field to tell your server whether or not to look up the host names of requesting Web clients. By default, DNS Lookup is disabled. Enabling will slightly slow down the server's performance.

The Home URL is set by default to /?Open. This means that when a Web user accesses the server by site name only, without specifying a directory or file name, your server will return a list of available Notes databases. The Web user could then click a database name to open it and see its available views, then click a document name to see a document. First impressions are all important on the Web, however, and you may want to present something a little catchier than a list of databases when a Web user comes calling. If you prefer, therefore, to have Domino return the site home page, you could either enter its name (which by default is /default.htm) or leave this field blank.

The server logging fields, by default, are blank, and therefore the server will not maintain an activity log. If you want to maintain a log, enter log file pathnames in the Access log and/or Error log fields. You can also enter user names in the Log filter field to specify those users whose activities you do not want to log.

Starting and Testing the Domino Web Server

Restart your Notes server. Start Domino by entering the following command at the server console prompt:

load http

A copyright notice should appear on the console, followed by the message "HTTP started." Congratulations! It's running. Now try to access the server with any Web browser. Enter its URL or IP address in the browser and press Enter. If you did not change Home URL field in the server document, your browser should now be displaying a list of Notes databases stored in the data directories of the Notes/Domino server. If you did change the Home URL field, you should be seeing the server's home page.

Finishing Domino Web Server Setup

If, from now on, you want HTTP Services for Lotus Notes to start automatically along with the Notes server, you can edit the NOTES.INI file, adding HTTP to the SERVERTASKS variable. When edited properly, SERVERTASKS will look something like this:

SERVERTASKS=Replica,Router,Update,Stats,Amgr,Adminp,HTTP

This statement will cause HTTP Services for Lotus Notes to start up along with all the other Notes server tasks listed, when you start the Notes server.

If you ever need to start the HTTP server task manually, enter the following command at the server console:

load http

If you ever have to stop the HTTP server task manually, enter the following command at the server console:

tell http quit

Notes Security

At this point, with the HTTP server task running and the Notes server connected to the Internet or Intranet, any Web user can access your databases. Since you probably don't want just any net surfer browsing around in our Notes databases and perhaps making changes in them, you may now want to invoke Notes security features to limit database access.

Notes has very strong security features. To gain access to databases on a standard (non-HTTP) Notes server, a Notes user has to first authenticate with the server, then survive the server's access list, then get past a series of access lists in each database. In the authentication process, both the user and the server have to prove to each other that they are members of trusted organizations and they have to prove their identities. This involves a series of encryptions and decryptions of information using public and private keys. Once the server has authenticated the user, the server may still refuse the user access to the server if the user is in a Not Access Server field or is not in an Access Server field in the Server's server document.

If the user gets past this checkpoint, the server will consider any user request to access a database. The server will consult the database's Access Control List, where the user may be listed, either individually or as a member of a group, as having Manager access, Designer access, Editor access, Author access, Reader access, Depositor access, or No access. Or the user may not be listed at all, in which case the user will be granted the Default level of access, which could be any of the listed levels. The rights that each access level grants are in Table 7.3.

Table 7.3  Lotus Notes Database Access Rights
Access LevelActivities Allowed
ManagerThe database manager can do anything in a database, including change the Access Control List
DesignerDatabase designers can do anything in a database, including making changes in the database design, but excluding making changes in the Access Control List
EditorDatabase editors can add data documents to a database and can make changes in any data document in the database, regardless of the document's authorship. Editors cannot change database design or the Access Control List
AuthorDatabase authors can create new data documents and they can edit documents they originally created. With certain exceptions, they cannot edit documents not authored by themselves. Nor can they make changes in the database design or Access Control List
ReaderDatabase readers can read data documents and views but cannot make changes of any kind in the database
DepositorDatabase depositors can create and save new data documents but cannot read any document, including their own after they close it, nor make changes of any kind in the database
No AccessUsers with no access will not be allowed to open a database at all

Assuming a user has some degree of access that allows him to at least read documents, the user may further be restricted by:

In Notes Release 4, you may relax Notes security by allowing unauthenticated users to access a given server and its databases. An unauthenticated user is one whose identity the server has not ascertained and who, therefore, is essentially anonymous to the server. You permit anonymous access by setting the Allow anonymous connections field in the server document in the public address book to "yes." You can control the degree of access such users have to given databases by adding Anonymous to each database's access control list and specifying the degree of access that Anonymous shall have. If you don't add Anonymous to a database Access Control List, anonymous users are granted Default access.

Notes Security and the Domino Web Server

When you install Domino on a Notes server and load the HTTP server task into the server's memory, you permit unauthenticated users to access your server and its databases even though you didn't expressly do so in the Allow anonymous connections field. As a result, whether you like it or not, Web users now have access to your databases. They have Anonymous access to any database in which Anonymous appears in the database's Access Control List. They have Default access to all other databases.

You can tighten up the security of the databases on your Domino server in several ways. First, you can review the Access Control List of every database on the server and ensure either that there is an entry in it for Anonymous, with the appropriate degree of access assigned, or that the degree of access assigned to Default is appropriate for unauthenticated Web users. Second, you can deny anonymous access to a given database, then require Web users who want access to it to register with you. This is known as "basic authentication," is a standard Web authentication technique, and gives a Web user individualized, that is, no longer anonymous access. Third, you can activate Secure Sockets Layer (SSL) security for Web-based transactions.

You can give a Web user individualized database access if you create a Person document for that user entering data in two fields. First, you must enter the user's name in the User Name field. This must be a non-distinguished name. That is, it must consist of a first name, optional middle initial, and a last name, and nothing more. Second, you must enter a password into the HTTP Password field. The password will be encrypted as soon as you save the Person document.

You can also give your registered Notes users access to the server via Web browser by making two changes in their Person documents. First, you have to change the User Name field so that it includes a non-distinguished version of their name as the first entry in that field. For example, that ace salesman for Acme Corporation, Bob Dobbs, is a Notes user whose fully distinguished name, as it appears in his Person document, is Bob Dobbs/Sales/AcmeCorp. You can insert his common name, Bob Dobbs, at the beginning of the field, separated from his fully distinguished name by a carriage return. The resulting entry in the field will look like this:

User name:     Bob Dobbs
               Bob Dobbs/Sales/AcmeCorp

Second, you have to enter a password in the HTTP Password field of the user's Person document. Thereafter, your Notes users will be able to access the Notes server using either their Notes client or Web browser.

TIP
If you don't feel like personally creating a Person document for every Web user who wants access to restricted databases (you lazy person, you!), you can set up a Notes registration application that will allow Web users to register themselves. Lotus provides a sample registration application at domino.lotus.com. Download it, use it as is, customize it, or pirate pieces of it and create your own registration application.

Domino and the SSL Protocol

The Domino Web Server supports the Secure Sockets Layer (SSL) security protocol. SSL is a public/private key encryption system that supports encryption of data transferred between the Domino server and Web clients, validation that messages were not tampered with en route, and digital signatures. This, in turn, permits you to establish true user/server authentication between Web users and your Domino Web server.

The SSL system works like other public/private key systems, such as Notes' own security system. That is, each user and server generates both a private key and a public key. The user or server then makes the public key available to the world and keeps the private key to him/her/itself.

The private key can decrypt data that was encrypted with the public key. The public key can decrypt data that was encrypted with the private key. If I want to encrypt a message to you, I do so with your public key. Only you have possession of your private key, so only you can decrypt the message. If I want to assure you that the message is really from me and not some impostor, I can sign the message with my private key. If you can decrypt the signature with my public key, you can assume it came from me, since (presumably) nobody but me has access to my private key.

The weakness of public/private key encryption systems is that anyone could send you a public key and tell you it is from me. How do you verify that it really is from me? Either you have to get the public key from me personally, establishing positive identification of me at that time, or you have to get someone whom you trust, a Certification Authority (CA) in SSL parlance, to vouch for me and the public key I am offering you. And, of course, I have to establish trust of your public key the same way. SSL, as implemented by Domino, permits you to establish trust either way. Either you can self-certify or you can involve a CA.

The way it works with a CA is that you and I both get the same CA to vouch for us (sort of like a mutual friend). The CA does it by issuing each of us a certificate, which we store in a file called a keyring file. My certificate states that I am who I claim to be. The CA signs the certificate and includes its own public key. When you and I initiate a conversation, we exchange certificates. Each of us trusts the certificate presented by the other because it is signed by the same CA who signed our own certificate. Therefore, we can safely assume that the public key presented by each other is genuinely the other's own public key.

When you set up a Notes/Domino server, if you want to set up secure transactions within your own Intranet, you can set yourself up as the company CA. Your office will issue the certificates to your Domino server and to all of the secured users. If you want to set up secure transactions outside your company, say, on the Internet, you could fall back on a commercial CA, such as VeriSign (www.verisign.com).

Domino comes with a Notes application, Domino SSL Administration, that automates the establishment of SSL security. It guides you through the process of either self-certifying or submitting a request for a certificate to either your own internal CA or VeriSign. It also guides you through the process of merging the resulting certificate into your keyring. Finally, if you want to become a CA yourself, it guides you through that process as well as the process of issuing certificates to others.

Publishing Our Notes Application

We wanted to take immediate advantage of the Domino. But some of the techniques we used for publishing our database with InterNotes Web Publisher would not work well with Domino, as indicated in Table 7.4.

Table 7.4  InterNotes Web Publisher Features Not Supported in Domino
$$ViewList$$ViewBody $$ImageMapBody$$Response
$$ViewSearchBar$$AboutDatabase $$Views 

On the other hand, Domino supports certain Notes features that InterNotes Web Publisher does not support, such as navigators created with background bitmaps and hotspots. So we copied our database and made the following changes:

Searching Notes Databases from Within a Web Browser

To open a Notes database from within your Web browser, enter its URL. Notes equates the server's name with its Internet domain name, so you do not have to know the Notes server name. If you know the path and file name of the Notes database, enter its URL in the following format:

http://server.domain.etc/path/filename.nsf

If you do not know a Notes database's filename, there is a URL which will prompt the Notes server to send you a list of available Notes databases, in which you can locate the database you want and then double-click its URL to download its default view. To receive a list of Notes databases, enter a URL in the following format:

http://server.domain.etc/?Open

Everything up to the question mark is the Notes object path, that is, the actual URL itself. The question mark is a delimiter. And the word Open is an implicit action, that is, a directive to Notes to open an object for you-in this case, to send you a list of available databases.

Figure 7.21 is a look at our application as published by our Domino server. First, we see our Navigators on the Web. This is an unfinished page-we were anxious to see the Navigators print.

Our Web navigator has three Notes hotspots, one pointing to each of our views. We move to see courses by date by clicking the hotspot. This view shows all courses collapsed in the view. Notice the options across the top of the page. These options, expand, search, and so on, were built by Domino. We did not have to create them. (See figure 7.22.)

Each of the triangle bullets, called "twisties" in Notes parlance, represents a collapsible section of a Notes view. This is a Notes Version 4 feature and it published well to our Web site. Clicking once on the category "Lotus Notes," we can see an offering of Notes classes by class title. Clicking once on the class title, the view expands to show dates and locations of the classes. (See figure 7.23.)

Clicking the hypertext which indicates the date for the scheduled class, we move to the event description to see more detail about this class. (See figure 7.24.)

Deciding that we want to register for the class, we click the Register hotspot. This opens the registration page. When we complete our registration, and click the submit button, our registration becomes a Notes document, available to our Notes users with proper access immediately. (See figure 7.25.)

Figure 7.25: The Notes registration form as designed in Notes. No HTML code was created on this page in Notes. The submit button uses @Commands to save the file and exit the window.