Apache Rivet

## Apache Rivet

### The Rivet Team

The Apache Software Foundation

`<rivet-dev@tcl.apache.org>`

Copyright © 2002-2016 Apache Software Foundation

List of Examples

1. Hello World
2. Generate a Colorful Table
3. Variable Access
4. File Upload
5. File Download
6. XML Messages and Ajax
7. A Calendar Utility

Document revision: $Revision: 1770196 $, last modified 2017-11-06 23:25:27+01:00$ by $Author: mxmanghi $.

## Introduction to Apache Rivet

Apache Rivet is a system for creating dynamic web content via a programming language integrated with Apache Web Server. It is designed to be fast, powerful and extensible, consume few system resources, be easy to learn, and to provide the user with a platform that can also be used for other programming tasks outside the web (GUI's, system administration tasks, text processing, database manipulation, XML, and so on). In order to meet these goals, we have chosen the Tcl programming language to combine with the Apache Web Server.

In this manual, we aim to help get you started, and then writing productive code as quickly as possible, as well as giving you ideas on how to best take advantage of Rivet's architecture to create different styles of web site.

This documentation is focused on the current version of Rivet, but still a work in progress, and, like everything else about Apache Rivet, it is Free Software. If you see something that needs improving, and have ideas or suggestions, don't hesitate to let us know. If you want to contribute directly, better yet!

### New commands in Rivet 2.3

Rivet 2.3 introduces 2 new commands ::rivet::exit and ::rivet::catch

- ::rivet::exit was introduced to help mod_rivet to give the command exit a more sensible behavior within the context of the Apache HTTP Web Server. In fact the core command has become an alias of ::rivet::exit which interrupts the script execution and hands control to any AbortScript, completes the request and just before returning to the web server framework terminates the child process by calling Tcl_Exit
- Since ::rivet::abort_page and ::rivet::exit interrupt a script execution returning a TCL_ERROR code any call to a catch construct would trap this error and AbortScript could be executed only by throwing the error condition again. We introduced the ::rivet::catch in order to simplify these operations. If any real error occurs the procedure returns 1 and fills the optional arguments with their expected values, otherwise execution is interrupted control passed on to AbortScript

|  | Apache Rivet Installation