WebSite

The WebSite application demonstrates how to import a Web site--consisting of HTML files and image files--from a file-based system to a database, using the same directory structure as the file system. This technique can be used to create a customized Web-based information system.

This sample application resides in the WebSite37 database.

One advantage of storing Web content files in a database is that the data can be navigated for full-text searching, similar to the way the SilverStream Application Server online help system works. Once the files are imported into the database, a servlet serves up the images and pages from the SilverStream server to your browser.

 
Top of page

Implementing this technique

To implement this technique:

  1. Install the WebSite database and add it to your server.

  2. Create an empty database to contain your Web-based system--the target database.

  3. In the Main Designer, publish the following objects from the WebSite database to the target database:

    Object

    Purpose

    Tables:

    • HTMLTable

    • ImageTable

    Stores the HTML and image files

    Page: pgStoreWebPages

    Reads a file structure and stores the data in the appropriate table

    Business object: bosrvletWebPages

    Serves up the pages in a browser

    Form: frmHTMLTable

    Displays and updates the HTML data

  4. Make sure the target URL directory--the directory where you want to store all Web pages--matches the URL named in the servlet bosrvletWebPages.

    By default, the servlet looks for a directory named WebPages. To alter this setting, make the following changes in bosrvletWebPages:

  5. Follow the additional instructions that appear in pgStoreWebPages.html:

  6. Verify that the process worked by opening your new database in a browser.

    You should see the URL you specified. By clicking on this link, you will be able to access your HTML pages and images.


Copyright © 2001, SilverStream Software, Inc. All rights reserved.