WebSTAR 4 Manual & Technical Reference

Manual Contents | Chapter Contents | Previous Page | Next Page

Actions

To link CGIs and Plug-Ins to URLs, you may need to create an Action entry. Then you can select that new Action for the appropriate entries in the Suffix Mapping Table .

Many people use Actions to support operations where a single CGI or Plug-In can work with many data files. For example, on a site with several image maps, URL requests for any map file information is passed tot he same CGI or Plug-In.

These Actions also allow you to hide implementation details from users. That is, the URL seen by users in a document isn't necessarily the URL that gets executed by the server.

Another use for user-defined Actions is to create new file types and define an Action to process them appropriately. For example, suppose you have .SQL files that contain SQL query statements. You would define an Action that would pass a query to an SQL database when an incoming URL request references a .SQL file.

See Example: ACGI Action

User-defined Actions also allow you to swap out or change CGIs or plug-ins without having to change URLs in your documents. You simply edit the Action to point to a new script.

Editing Actions Entries

The Actions List lets you add, delete, or modify user-defined Actions. Actions with a mark in the lock column are defined by Plug-Ins and cannot be edited.

Changes in the Actions List are stored in the WebSTAR Settings file.

Defining an Action requires these two elements:

No spaces or Macintosh special characters may in the application path or Action name. If those characters appear in the application path or names, follow the instructions in Web File and Folder Name Rules to encode them yourself.

WebSTAR Admin Actions List

Choose the Actions item in the WebSTAR Admin Settings window to open the Actions List. You'll see a list like this:

 

Each default Action and WebSTAR Plug-In has a line in this list, and is marked as "locked" in the left column. You can change any other entry, or add your own Actions.

To make a new Action entry, decide where you want it to be in the list. WebSTAR will use this order in the Suffix Mapping Action Popup Menu . Then select the entry before the new entry, and click the New button. Follow the instructions above to fill in the fields.

see Working With Admin Lists .

Browser Admin Action List

The WebSTAR Browser Admin pages also allow you to work with the Actions List. Go to the Administration main page, and choose Settings > Actions.

To make a new Action entry, follow the instructions above to fill the fields. Then click the Add New Entry button.

To edit an Action entry, click on the Select" radio button for that entry, and then click the Edit Selection button. When you're done with your changes, click the Replace Selection button, and your changes will be saved.

To delete an entry, click on the Select radio button for that field and click the Delete Selection button.

Using Actions

After you have defined an Action, you can use it in Suffix Mappings. When you add or change an Action, WebSTAR forces a reinterpretation of all Suffix Mappings. If it finds that a previously defined Action which was used by a mapping is now absent, that mapping is ignored (though it remains in the Settings file).

Example: ACGI Action

To use a (mythical) webstarSQL Plug-In to process all URLs searching a database, follow these steps:

1 Select the Actions panel and create a new Action entry.
2 Set the Action name to SQL and the path to the appropriate path to webstarSQL in the Plug-Ins folder, then press the Save button.
 
3 To associate the Action with all .SQL files, open the Suffix Mapping pane, and make a new Suffix Map entry.
4 Select the Action popup menu, and you'll see "SQL" as a new option at the bottom. Select it.
5 Fill in the entry so that all URLs which end with .SQL use the SQL Action and the standard " text/html " MIME type.
 

From now on, all .SQL URLs will call the webstarSQL application for processing.


Manual Contents | Chapter Contents | Previous Page | Next Page