Some examples of Rivet usage follow. Some prior Tcl knowledge is assumed. If you don't know much Tcl, don't worry, it's easy, and there are some good resources available on the web that will get you up to speed quickly. Go to the web sites section and have a look.
Example 1. Hello World
As with any tool, it's always nice to see something work, so let's create a small "Hello World" page.
Assuming you have Apache configured correctly, create a file called hello.rvt where Apache can find it, with the following content:
If you then access it with your browser, you should see a blank page with the text "Hello World" (without the quotes) on it.
Example 2. Generate a Table
In another simple example, we dynamically generate a table:
If you read the code, you can see that this is pure Tcl. We could take the same code, run it outside of Rivet, and it would generate the same HTML!
The result should look something like this:

Example 3. Variable Access
Here, we demonstrate how to access variables set by GET or POST operations.
Given an HTML form like the following:
We can use this Rivet script to get the variable values:
The first statement checks to make sure that the boss variable has been passed to the script, and then does something with that information. If it's not present, an error is added to the list of errors.
In the second block of code, the variable salary is fetched, with one more error check - because it's a number, it needs to be composed of digits.
The boss variable isn't required to have been sent - we set it to "Mr. Burns" if it isn't among the information we received.
The last bit of variable handing code is a bit trickier. Because skills is a listbox, and can potentially have multiple values, we opt to receive them as a list, so that at some point, we could iterate over them.
The script then checks to make sure that errlist is empty (printing an error if it is) and outputting a thankyou message.
Example 4. File Upload
The following HTML in one file, say, upload.html
Can be used with the following Tcl code, in a second file (upload.rvt for instance) in order to create a file upload form.