In the following sections, you will learn how to set the default document of WAP / web sites with Apache, Tomcat and IIS.

9.3. Setting Default Documents of WAP / Web Sites with Apache

In Apache, the default documents of a WAP / web site are specified with the DirectoryIndex directive in the configuration file located at apache_home/conf/httpd.conf, where apache_home is the path under which Apache was installed on your server.

To change the setting, search for the line that begins with "DirectoryIndex" in the httpd.conf file. Then you can modify the line according to the following form:

DirectoryIndex file1 file2 file3 ...

Here is an example:

DirectoryIndex index.wml default.wml

The above line specifies that:

9.4. Setting Default Documents of WAP / Web Sites with Tomcat

In Tomcat 5.x and 4.x, the pre-set default document settings are stored in the file tomcat_home/conf/web.xml, where tomcat_home is the path under which Tomcat was installed. The settings in this file will be applied to all WAP / web sites hosted on your Tomcat server.

Default documents are specified with the <welcome-file-list> and <welcome-file> tags. Here is an example:






The above example specifies that:

If you want the settings to be applied to only one WAP site but not to all sites hosted on your Tomcat server, you should place the above markup in WEB-INF/web.xml under the directory of that WAP site, but not in tomcat_home/conf/web.xml.

If the <welcome-file-list> tag exists in both tomcat_home/conf/web.xml and WEB-INF/web.wml, the settings specified in WEB-INF/web.xml will override those specified in tomcat_home/conf/web.xml.

9.5. Setting Default Documents of WAP / Web Sites with Microsoft IIS

Microsoft IIS provides a GUI for setting up default documents of WAP / web sites. Below lists the steps for setting up default documents with IIS 5.0 on Microsoft Windows 2000 Professional:

  1. Bring up the Internet Information Services window by selecting Control Panel -> Administrative Tools -> Internet Service Manager.

  2. In the tree on the left-hand side, you should see an item whose caption is your computer's name. Right-click on it to pop up a menu.

  3. Click Properties in the menu to bring up the Properties window.

  4. Select the WWW Service item in the Master Properties combo box and click the Edit button next to it.

  5. In the Default Web Site Properties window, click the Documents tab.

  6. Click the Enable Default Document check box if it is not checked. Then use the buttons labeled "New..." and "Remove" to add or remove file names. The file at the top of the list will be served first.

The steps for setting default documents with other versions of IIS should be similar.

Previous Page Page 13 of 13

Feedback Form (ExpandCollapse)

What do you think about this web page?

(Optional) Please provide us more details. For example, suppose you select option 2 above, can you tell us specifically what information is missing? You can also suggest anything that can help us improve this web page.

(Optional) Your name:

(Optional) Your email address:

Please enter again to confirm:

Due to the amount of messages we received, we may not be able to reply to all messages.

A button for going back to the top of this page