You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-cvs@tcl.apache.org by da...@apache.org on 2002/08/06 20:50:36 UTC

cvs commit: tcl-site/rivet/docs commands.html directives.html help.html index.html internals.html.html upgrading.html

davidw      2002/08/06 11:50:36

  Added:       rivet/docs commands.html directives.html help.html
                        index.html internals.html.html upgrading.html
  Log:
  Added Rivet docs.
  
  Revision  Changes    Path
  1.1                  tcl-site/rivet/docs/commands.html
  
  Index: commands.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Tcl Commands and Variables</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="directives.html" title="Rivet Apache Directives"><link rel="next" href="help.html" title="Resources - How to Get Help"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Tcl Commands and Variables</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="directives.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="help.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="commands"></a>Rivet Tcl Commands and Variables</h2></div></div><div class="variablelist"><dl><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>var</tt></span>  <tt><span style="text-decoration:underline">get</span></tt> <tt><span style="text-decoration:underline"><i><tt>varname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the value of variable <tt><span style="text-decoration:underline">varname</span></tt> as a
  	    string (even if there are multiple values).
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>var</tt></span>  <tt><span style="text-decoration:underline">list</span></tt> <tt><span style="text-decoration:underline"><i><tt>varname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the value of variable <tt><span style="text-decoration:underline">varname</span></tt> as
  	    a list, if there are multiple values.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>var</tt></span>  <tt><span style="text-decoration:underline">exists</span></tt> <tt><span style="text-decoration:underline"><i><tt>varname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns 1 if <tt><span style="text-decoration:underline">varname</span></tt> exists, 0 if it
  	    doesn't.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>var</tt></span>  <tt><span style="text-decoration:underline">number</span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the number of variables.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>var</tt></span>  <tt><span style="text-decoration:underline">all</span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Return a list of variable names and values.
  	  </div></div></dd></dl></div><div class="variablelist"><dl><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">channel</span></tt> <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    When given the name of a file upload
  	    <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt>,
  	    returns a Tcl channel that can be used to access the
  	    uploaded file.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">save</span></tt> <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt> <tt><span style="text-decoration:underline"><i><tt>filename</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Saves the
  	    <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt> in
  	    the file
  	    <tt><span style="text-decoration:underline"><i><tt>filename</tt></i></span></tt>.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">data</span></tt> <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns data uploaded to the server.  This is binary clean
  	    - in other words, it will work even with files like
  	    images, executables, compressed files, and so on.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">size</span></tt> <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the size of the file uploaded.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">type</span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    If the Content-type is set, it is returned, otherwise, an
  	    empty string.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">filename</span></tt> <tt><span style="text-decoration:underline"><i><tt>uploadname</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the filename on the remote host that uploaded the file.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>upload</tt></span>  <tt><span style="text-decoration:underline">names</span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Returns the variable names, as a list, of all the files
  	    uploaded.
  	  </div></div></dd></dl></div><div class="example"><p class="title"><b>Example 1. upload</b></p>
        The following HTML:
        <pre style="background:#bbffbb ; width:auto" class="programlisting">
  	&lt;form action=&quot;foo.ttml&quot; enctypee=&quot;multipart/form-data&quot;
  	method=&quot;post&quot;&gt;
  	&lt;input type=&quot;file&quot; name=&quot;MyUpload&quot;&gt;&lt;/input&gt;
  	&lt;/form&gt;
        </pre>
  
        Can be used with the following Tcl code in order to create a
        file upload form.
  
        <pre style="background:#bbffbb ; width:auto" class="programlisting">
  	upload save MyUpload /tmp/uploadfiles/file1
  
  	puts &quot;Saved file [upload filename MyUpload]
  	([upload size MyUploadto] bytes) to server&quot;
        </pre></div><div class="variablelist"><dl><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>load_env</tt></span>  ?<tt><span style="text-decoration:underline"><i><tt>array_name</tt></i></span></tt>?</span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Load the array of environment variables into the specified
  	    array name.  Uses array <tt><span style="text-decoration:underline">::request::env</span></tt> by
  	    default.
  	  </div><div style="margin-bottom:6">
  	    As Rivet pages are run in the <tt><span style="text-decoration:underline">::request</span></tt>
  	    namespace, it isn't necessary to qualify the array name
  	    for most uses - it's ok to access it as
  	    <tt><span style="text-decoration:underline">env</span></tt>.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>load_headers</tt></span>  <tt><span style="text-decoration:underline"><i><tt>array_name</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Load the headers that come from a client request into the
  	    provided array name, or use <tt><span style="text-decoration:underline">headers</span></tt> if no
  	    name is provided.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>load_cookies</tt></span>  ?<tt><span style="text-decoration:underline"><i><tt>array_name</tt></i></span></tt>?</span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Load the array of cookie variables into the specified
  	    array name.  Uses array <tt><span style="text-decoration:underline">cookies</span></tt> by
  	    default.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>include</tt></span>  <tt><span style="text-decoration:underline"><i><tt>filename_name</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Include a file without parsing it for processing tags &lt;?
  	    and ?&gt;.  This is the best way to include an HTML file or
  	    any other static content.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>parse</tt></span>  <tt><span style="text-decoration:underline"><i><tt>filename</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Like the Tcl <span style="font-family:monospace"><b>source</b></span> command, but also
  	    parses for Rivet &lt;?  and ?&gt; processing tags.  Using
  	    this command, you can use one .rvt file from another.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>headers</tt></span>  <tt><span style="text-decoration:underline">redirect</span></tt> <tt><span style="text-decoration:underline"><i><tt>uri</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Redirect from the current page to a new
  	    URI. <span class="emphasis"><em>Must</em></span> be done in the first block
  	    of TCL code.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>headers</tt></span>  <tt><span style="text-decoration:underline">setcookie</span></tt> <tt><span style="text-decoration:underline">-name</span></tt> <tt><span style="text-decoration:underline"><i><tt>cookie-name</tt></i></span></tt> <tt><span style="text-decoration:underline">-value</span></tt> <tt><span style="text-decoration:underline"><i><tt>cookie-value</tt></i></span></tt> ?<tt><span style="text-decoration:underline">-expires</span></tt> <tt><span style="text-decoration:underline"><i><tt>date/time</tt></i></span></tt>? ?<tt><span style="text-decoration:underline">-domain</span></tt> <tt><span style="text-decoration:underline"><i><tt>domain</tt></i></span></tt>? ?<tt><span style="text-decoration:underline">-path</span></tt> <tt><span style="text-decoration:underline"><i><tt>path</tt></i></span></tt>? ?<tt><span style="text-decoration:underline">-secure</span></tt>?</span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    This command is for setting cookies for the server to send
  	    to the client.  <tt><span style="text-decoration:underline">cookie-name</span></tt> is the name
  	    of the cookie, <tt><span style="text-decoration:underline">cookie-value</span></tt> is the data
  	    associated with the cookie.  <tt><span style="text-decoration:underline">-expires</span></tt>
  	    sets an expiration date for the cookie, and must be in the
  	    format <tt>'DD-Mon-YY HH:MM:SS'</tt>,
  	    <tt><span style="text-decoration:underline">-path</span></tt> sets the path for which the cookie
  	    is valid, and <tt><span style="text-decoration:underline">-secure</span></tt> specifies that the
  	    cookie is only to be transmitted if the connection is
  	    secure (HTTPS).
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term"><div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>headers</tt></span>  <tt><span style="text-decoration:underline">type</span></tt> <tt><span style="text-decoration:underline"><i><tt>content-type</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    This command sets the <tt>Content-type</tt>
  	    header returned by the script, which is useful if you wish
  	    to send content other than HTML with Rivet - PNG or jpeg
  	    images, for example.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term"><div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>headers</tt></span>  <tt><span style="text-decoration:underline">set</span></tt> <tt><span style="text-decoration:underline"><i><tt>headername</tt></i></span></tt> <tt><span style="text-decoration:underline"><i><tt>value</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Set arbitrary header names and values.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>makeurl</tt></span>  <tt><span style="text-decoration:underline"><i><tt>filename</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Create a self referencing URL from a filename.  For example:
  	    <pre style="background:#bbffbb ; width:auto" class="programlisting">makeurl /tclp.gif</pre>
  	    returns
  	    <tt>http://[hostname]:[port]/tclp.gif</tt>.
  	    where hostname and port are the hostname and port of the
  	    server in question.
  	  </div></div></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="directives.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="help.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Rivet Apache Directives�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Resources - How to Get Help</td></tr></table></div></body></html>
  
  
  
  1.1                  tcl-site/rivet/docs/directives.html
  
  Index: directives.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Apache Directives</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="index.html" title="Apache Rivet"><link rel="next" href="commands.html" title="Rivet Tcl Commands and Variables"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Apache Directives</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="commands.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="directives"></a>Rivet Apache Directives</h2></div></div><div class="variablelist"><dl><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">GlobalInitScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Tcl script that is run when each interpreter is
  	    initialized.  <tt><span style="text-decoration:underline">script</span></tt> is an actual Tcl
  	    script, so to run a file, you would do:
  	  </div><pre style="background:#bbffbb ; width:auto" class="programlisting">
  	    Rivet_Script GlobalInitScript &quot;source /var/www/foobar.tcl&quot;
  	  </pre></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">ChildInitScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Script to be evaluated when each Apache child process is
  	    initialized.  This is the recommended place to load modules.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">ChildExitScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Script to be evaluated when each Apache child process exits.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">BeforeScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div></span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Script to be evaluated before each server parsed (.rvt) page.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">AfterScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div></span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Script to be called after each server parsed (.rvt) page.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_Script</tt></span>  <tt><span style="text-decoration:underline">ErrorScript</span></tt> <tt><span style="text-decoration:underline"><i><tt>script</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    This code is called in place of the standard 'error' pages
  	    generated for Rivet.  This directive may be useful if you
  	    have sensitive logic that you wish to protect.
  	  </div></div></dd><dt><span style="background:#bbbbff"><span class="term">
  	  <div class="cmdsynopsis"><span style="background:#bbbbff"><br><span style="font-weight:bold"><tt>Rivet_CacheSize</tt></span>  <tt><span style="text-decoration:underline"><i><tt>cachesize</tt></i></span></tt></span></div>
  	</span></span></dt><dd><div style="background:#dddddd ; padding:4 ; margin-top:3 ;  margin-bottom:3 ; width:75%"><div style="margin-bottom:6">
  	    Number of rvt scripts to cache as Tcl Objects.  Default is
  	    <span style="font-family:monospace"><b>MaxRequestsPerChild</b></span> / 2, or 50, if
  	    <span style="font-family:monospace"><b>MaxRequestsPerChild</b></span> is 0.
  	  </div></div></dd></dl></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="index.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="commands.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Apache Rivet�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Rivet Tcl Commands and Variables</td></tr></table></div></body></html>
  
  
  
  1.1                  tcl-site/rivet/docs/help.html
  
  Index: help.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Resources - How to Get Help</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="commands.html" title="Rivet Tcl Commands and Variables"><link rel="next" href="internals.html.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Resources - How to Get Help</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="commands.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="internals.html.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="help"></a>Resources - How to Get Help</h2></div></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346056"></a>Mailing Lists</h3></div></div><p style="width:90%">
  	The Rivet mailing list is the first place you should turn for
  	help, if you haven't found the solution to your problem in the
  	documentation.  Send email to
  	<tt>&lt;<a href="mailto:rivet-user@tcl.apache.org">rivet-user@tcl.apache.org</a>&gt;</tt>.  If you have a
  	question, idea, or comment about the Rivet code itself, please
  	send us email at <tt>&lt;<a href="mailto:rivet-dev@tcl.apache.org">rivet-dev@tcl.apache.org</a>&gt;</tt>.  To
  	subscribe to either list, post email to
  	<tt>&lt;<a href="mailto:rivet-list-subscribe@tcl.apache.org">rivet-<i><tt>list</tt></i>-subscribe@tcl.apache.org</a>&gt;</tt>.
        </p><p style="width:90%">
  	The mailing list archives are available at <a href="http://www.apachelabs.org" target="_top">http://www.apachelabs.org</a>
        </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346102"></a>Web Sites</h3></div></div><p style="width:90%">
  	There are several web sites that cover Apache and Tcl
  	extensively.
        </p><div class="itemizedlist"><ul type="disc"><li><div style="margin-bottom:6">
  	    <a href="http://tcl.apache.org" target="_top">http://tcl.apache.org</a> is the home for the
  	    Apache Tcl project.  Go there for the latest versions of
  	    our software (if you aren't reading these pages off of the
  	    site!).
  	  </div></li><li><div style="margin-bottom:6">
  	    <a href="http://httpd.apache.org/docs/" target="_top">http://httpd.apache.org/docs/</a> is the first
  	    place to go for questions about the Apache web server.
  	  </div></li><li><div style="margin-bottom:6">
  	    <a href="http://www.tcl.tk/" target="_top">http://www.tcl.tk/</a> is the cannonical site
  	    for Tcl information.
  	  </div></li><li><div style="margin-bottom:6">
  	    <a href="htt://wiki.tcl.tk" target="_top">htt://wiki.tcl.tk</a> is the Tcl'ers Wiki, a
  	    free-form place to search for answers and ask for help.
  	  </div></li></ul></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="commands.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="internals.html.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Rivet Tcl Commands and Variables�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Rivet Internals</td></tr></table></div></body></html>
  
  
  
  1.1                  tcl-site/rivet/docs/index.html
  
  Index: index.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Apache Rivet</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="next" href="directives.html" title="Rivet Apache Directives"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Apache Rivet</th></tr><tr><td width="20%" align="left">�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="directives.html">Next</a></td></tr></table><hr></div><div class="article"><div class="titlepage"><div><h1 class="title"><a name="id5343887"></a>Apache Rivet</h1></div><div><div class="author"><h3 class="author">David Welton</h3></div></div><div><p class="releaseinfo">
        $Id: rivet.xml,v 1.2 2002/07/21 16:30:31 davidw Exp $
      </p></div><div><p class="copyright">Copyright � 2002 Apache Software Foundation</p></div><hr></div><div class="toc"><p><b>Table of Contents</b></p><dl><dt><a href="index.html#id5344184">Apache Rivet Installation</a></dt><dt><a href="directives.html">Rivet Apache Directives</a></dt><dt><a href="commands.html">Rivet Tcl Commands and Variables</a></dt><dt><a href="help.html">Resources - How to Get Help</a></dt><dd><dl><dt><a href="help.html#id5346056">Mailing Lists</a></dt><dt><a href="help.html#id5346102">Web Sites</a></dt></dl></dd><dt><a href="internals.html.html">Rivet Internals</a></dt><dd><dl><dt><a href="internals.html.html#id5346203">Initialization</a></dt><dt><a href="internals.html.html#id5346240">RivetChan</a></dt><dt><a href="internals.html.html#id5346269">Page Parsing, Execution and Cacheing</a></dt></dl></dd><dt><a href="upgrading.html">Upgrading from mod_dtcl or NeoWebScript</a></dt><dd><dl><dt><a href="upgrading.html#id5346348">mod_dtcl</a></dt><dt><a href="upgrading.html#id5346364">NeoWebScript</a></dt></dl></dd></dl></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="id5344184"></a>Apache Rivet Installation</h2></div></div><div class="procedure"><ol type="1"><li><p class="title"><b>Check Dependencies</b></p><p style="width:90%">
  	  To install Rivet, you will need Tcl 8.2 or greater and
  	  Apache 1.3.xx.  It is known to run on Linux, FreeBSD,
  	  OpenBSD, and Solaris and HPUX.  Windows NT is also possible
  	  - please see the directions in the distribution.
  	</p></li><li><p class="title"><b>Get Rivet</b></p><p style="width:90%">
  	  Download the sources at <a href="http://tcl.apache.org/Rivet/download" target="_top">http://tcl.apache.org/Rivet/download</a>.  Currently
  	  the only way to obtain Rivet.  In the future, we hope to
  	  have a FreeBSD port, Debian package, RPM's, and windows
  	  binaries.
  	</p></li><li><p class="title"><b>Get and Install Apache Sources</b></p><p style="width:90%">
  	  If you don't have them, or if you want to build Rivet as a
  	  static (built in) part of the Apache web server, you need
  	  the source code to Apache, which is available from <a href="http://httpd.apache.org/" target="_top">http://httpd.apache.org/</a>.  Otherwise, you don't need
  	  to perform this step.  Infact, we recommend that you build
  	  Rivet as a shared object, and therefore, build it seperately
  	  from Apache.
  	</p></li><li><p class="title"><b>Uncompress Sources</b></p><p style="width:90%">
  	  We will assume that you have Apache installed at this point.
  	  You must uncompress the Rivet sources in the directory where you
  	  wish to compile them.
  	  <pre style="background:#bbffbb ; width:auto" class="programlisting">
  	    gunzip tcl-rivet-X.X.X.tar.gz
  	    tar -xvf tcl-rivet-X.X.X.tar.gz
  	  </pre>
  	</p></li><li><p class="title"><b>Building Rivet</b></p><p style="width:90%">
  	  Rivet uses a unique build system which we created especially
  	  for this project.  It utilizes the information included in
  	  Apache and Tcl regarding their configurations, in order to
  	  compile itself via a series of Tcl scripts, which are
  	  located in the <tt>buildscripts/</tt> directory.
  	</p><ol type="a"><li><p class="title"><b>Edit src/make.tcl</b></p><p style="width:90%">
  	      It may be necessary to edit
  	      <tt>src/make.tcl</tt> by hand in order to
  	      set certain options.  Try the next step first, and see
  	      if it's successful.
  	    </p></li><li><p style="width:90%">At this point, you are ready to run the build
  	      system:</p><pre style="background:#bbffbb ; width:auto" class="programlisting">
  	      cd src/
  	      ./make.tcl <i><tt>option</tt></i>
  	    </pre><p style="width:90%">where <i><tt>option</tt></i> can be
  	      either <tt><span style="text-decoration:underline">shared</span></tt> or
  	      <tt><span style="text-decoration:underline">static</span></tt>.
  	    </p></li><li><p class="title"><b>Install</b></p><p style="width:90%">
  	      Now, you are ready to run the <span style="font-family:monospace"><b>./make
  		install</b></span> command to install the resulting
  	      files.  This should copy the shared object (like
  	      <tt>mod_rivet.so</tt>, if one was
  	      successfully created, into Apache's
  	      <tt>libexec</tt> directory, as well as
  	      install some support scripts and various code.
  	    </p></li></ol></li><li><p class="title"><b>Apache Configuration Files</b></p><p style="width:90%">
  	  Rivet is relatively easy to configure - we start off by
  	  adding the module itself:
  	</p><pre style="background:#bbffbb ; width:auto" class="programlisting">
  	  LoadModule rivet_module <i><tt>/usr/lib/apache/1.3/mod_rivet.so</tt></i>
  	</pre><p style="width:90%">
  	  This tells Apache to load the Rivet shared object, wherever
  	  it happens to reside on your file system.  Now we have to
  	  tell Apache what kind of files are &quot;Rivet&quot; files and how to
  	  process them:
  	</p><pre style="background:#bbffbb ; width:auto" class="programlisting">
  	  AddType application/x-httpd-rivet .rvt
  	  AddType application/x-rivet-tcl .tcl
  	</pre><p style="width:90%">
  	  These tell Apache to process files with the
  	  <tt>.rvt</tt> and <tt>.tcl</tt>
  	  extensions as Rivet files.
  	</p><p style="width:90%">
  	  For other directives that Rivet provides for Apache
  	  configuration, please see <a href="directives.html#directives" title="Rivet Apache Directives">the section called &#8220;Rivet Apache Directives&#8221;</a>.
  	</p></li></ol></div></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left">�</td><td width="20%" align="center">�</td><td width="40%" align="right">�<a accesskey="n" href="directives.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">�</td><td width="20%" align="center">�</td><td width="40%" align="right" valign="top">�Rivet Apache Directives</td></tr></table></div></body></html>
  
  
  
  1.1                  tcl-site/rivet/docs/internals.html.html
  
  Index: internals.html.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Rivet Internals</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="help.html" title="Resources - How to Get Help"><link rel="next" href="upgrading.html" title="Upgrading from mod_dtcl or NeoWebScript"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Rivet Internals</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="help.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�<a accesskey="n" href="upgrading.html">Next</a></td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="internals.html"></a>Rivet Internals</h2></div></div><p style="width:90%">
        This section easily falls out of date, as new code is added, old
        code is removed, and changes are made.  The best place to look
        is the source code itself.  If you are interested in the changes
        themselves FIXME.
      </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346203"></a>Initialization</h3></div></div><p style="width:90%">
  	When Apache is started, (or when child Apache processes are
  	started if a threaded Tcl is used),
  	<tt>Rivet_InitTclStuff</tt> is called, which
  	creates a new interpreter, or one interpreter per virtual
  	host, depending on the configuration. It also initializes
  	various things, like the RivetChan
  	channel system, creates the Rivet-specific Tcl commands, and
  	executes Rivet's <tt>init.tcl</tt>.  The caching
  	system is also set up, and if there is a
  	<span style="font-family:monospace"><b>GlobalInitScript</b></span>, it is run.
        </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346240"></a>RivetChan</h3></div></div><p style="width:90%">
  	The RivetChan system was created in
  	order to have an actual Tcl channel that we could redirect
  	standard output to.  This lets us use, for instance, the
  	regular <span style="font-family:monospace"><b>puts</b></span> command in .rvt pages.  It
  	works by creating a channel that buffers output, and, at
  	predetermined times, passes it on to Apache's IO system.
  	Tcl's regular standard output is replaced with an instance of
  	this channel type, so that, by default, output will go to the
  	web page.
        </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346269"></a>Page Parsing, Execution and Cacheing</h3></div></div><p style="width:90%">
  	When a Rivet page is requested, it is transformed into an
  	ordinary Tcl script by parsing the file for the &lt;? ?&gt;
  	processing instruction tags.  Everything outside these tags
  	becomes a large <span style="font-family:monospace"><b>puts</b></span> statement, and
  	everything inside them remains Tcl code.
        </p><p style="width:90%">
  	Each .rvt file is evaluated in its own
  	<tt>::request</tt> namespace, so that it is not
  	necessary to create and tear down interpreters after each
  	page.  By running in its own namespace, though, each page will
  	not run afoul of local variables created by other scripts,
  	because they will be deleted automatically when the namespace
  	goes away after Apache finishes handling the request.
        </p><div class="note" style="margin-left: 0.5in; margin-right: 0.5in;"><h3 class="title">Note</h3>
  	One current problem with this system is that while variables
  	are garbage collected, file handles are not, so that it is
  	very important that Rivet script authors make sure to close
  	all the files they open.
        </div><p style="width:90%">
  	After a script has been loaded and parsed into it's &quot;pure Tcl&quot;
  	form, it is also cached, so that it may be used in the future
  	without having to reload it (and re-parse it) from the disk.
  	The number of scripts stored in memory is configurable.  This
  	feature can significantly improve performance.
        </p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="help.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�<a accesskey="n" href="upgrading.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Resources - How to Get Help�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�Upgrading from mod_dtcl or NeoWebScript</td></tr></table></div></body></html>
  
  
  
  1.1                  tcl-site/rivet/docs/upgrading.html
  
  Index: upgrading.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  <html><head><meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"><title>Upgrading from mod_dtcl or NeoWebScript</title><meta name="generator" content="DocBook XSL Stylesheets V1.50.0"><link rel="home" href="index.html" title="Apache Rivet"><link rel="up" href="index.html" title="Apache Rivet"><link rel="previous" href="internals.html.html" title="Rivet Internals"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Upgrading from mod_dtcl or NeoWebScript</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="internals.html.html">Prev</a>�</td><th width="60%" align="center">�</th><td width="20%" align="right">�</td></tr></table><hr></div><div class="section"><div class="titlepage"><div><hr><h2 class="title" style="clear: both"><a name="upgrading"></a>Upgrading from mod_dtcl or NeoWebScript</h2></div></div><p style="width:90%">
        Rivet is a break from the past, in that we, the authors, have
        attempted to take what we like best about our past efforts, and
        leave out or change things we no longer care for.  Backwards
        compatibility was not a primary goal when creating Rivet, but we
        do provide this information which may be of use to those wishing
        to upgrade from mod_dtcl or NWS installations.
      </p><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346348"></a>mod_dtcl</h3></div></div><p style="width:90%">
  	Rivet was originally based on the dtcl code, but it has
  	changed (improved!) quite a bit.  The concepts remain the
  	same, but many of the commands have changed.
        </p></div><div class="section"><div class="titlepage"><div><h3 class="title"><a name="id5346364"></a>NeoWebScript</h3></div></div><p style="width:90%">TODO</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="internals.html.html">Prev</a>�</td><td width="20%" align="center"><a accesskey="u" href="index.html">Up</a></td><td width="40%" align="right">�</td></tr><tr><td width="40%" align="left" valign="top">Rivet Internals�</td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top">�</td></tr></table></div></body></html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: tcl-site-cvs-unsubscribe@tcl.apache.org
For additional commands, e-mail: tcl-site-cvs-help@tcl.apache.org