<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rcobb</id>
	<title>AOLserver Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://panoptic.com/mediawiki/aolserver/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Rcobb"/>
	<link rel="alternate" type="text/html" href="https://panoptic.com/wiki/aolserver/Special:Contributions/Rcobb"/>
	<updated>2026-04-08T11:58:30Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.34.2</generator>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5141</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5141"/>
		<updated>2008-04-16T19:36:11Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Configuring a binary or combined binary &amp;amp; Tcl module into your server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [http://aolserver.com/docs/devel/c/ in the AOLServer C Developer's Guide], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup.  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/servers/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/servers/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    NS_EXPORT int&lt;br /&gt;
    Foo_ModInit(char* server, char* module)&lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5140</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5140"/>
		<updated>2008-04-16T19:33:47Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Tcl Modules */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [http://aolserver.com/docs/devel/c/ in the AOLServer C Developer's Guide], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called &amp;quot;Ns_ModuleInit&amp;quot; and an external integer called &amp;quot;Ns_Version&amp;quot;).  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/servers/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/servers/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    NS_EXPORT int&lt;br /&gt;
    Foo_ModInit(char* server, char* module)&lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
For example:&lt;br /&gt;
:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5139</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5139"/>
		<updated>2008-04-16T19:29:00Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [http://aolserver.com/docs/devel/c/ in the AOLServer C Developer's Guide], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called &amp;quot;Ns_ModuleInit&amp;quot; and an external integer called &amp;quot;Ns_Version&amp;quot;).  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/servers/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/servers/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
    NS_EXPORT int&lt;br /&gt;
    Foo_ModInit(char* server, char* module)&lt;br /&gt;
    {&lt;br /&gt;
        ...&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5138</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5138"/>
		<updated>2008-04-16T19:28:23Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Configuring a binary or combined binary &amp;amp; Tcl module into your server */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [http://aolserver.com/docs/devel/c/ in the AOLServer C Developer's Guide], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called &amp;quot;Ns_ModuleInit&amp;quot; and an external integer called &amp;quot;Ns_Version&amp;quot;).  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/servers/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/servers/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
NS_EXPORT int&lt;br /&gt;
Foo_ModInit(char* server, char* module)&lt;br /&gt;
{&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5137</id>
		<title>AOLserver Developer's Guide</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5137"/>
		<updated>2008-04-16T19:27:26Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''(Lets not split these into seperate pages until there's enough content.)''&lt;br /&gt;
We assume the reader is somewhat familiar with http://aolserver.com/docs/devel/c/, or its peer pages, and now is looking for more advanced development topics.&lt;br /&gt;
* [[AOLserver and Tcl Crash Course]] - A Programmer's Introduction (Outline)&lt;br /&gt;
* '''AOLserver Internals''' -- a guide to common [[data structures]], a description of the lifetimes of a [[thread]], an [[interpreter]], a [[request]], and a [[connection]].  Discussions of memory allocation.  The [[Private C API]].&lt;br /&gt;
* '''AOLserver and Tcl''' -- Expanded conversation about integration of AOLserver and [[Tcl]].  Issues of multi-threaded Tcl; the Tcl Library; the lifecycle of a Tcl Interp including initialization, synchronization with other threads, interthread communication, and Tcl Interp cleanup and teardown.  The [[Tcl API]].&lt;br /&gt;
* '''AOLserver and other [[languages]]''' -- a discussion of how AOLserver integrates with [[PHP]], [[Python]], [[Java]], etc. and how these language implementations differ from AOLserver Tcl's implementation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Configuration''' -- a walk-through of the basic steps to properly configure AOLserver, from database pools to virtual hosting.&lt;br /&gt;
** Here's a starter for [[Virtual Hosting]] in AOLserver 3.x and 4.x.&lt;br /&gt;
** [[Module inclusion]] and how your files are treated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver in a multi-server environment''' -- so you've outgrown one server, a discussion of AOLserver in a multi-server environment, including load balancing, clustering, session management, logging, and database replication&lt;br /&gt;
* '''AOLserver Development''' -- AOLserver Best Practices, including application development, emacs hacks, use of the control port, to &lt;br /&gt;
* '''AOLserver Troubleshooting''' -- An enumeration of known problems and suggested fixes.  A discussion of narrowing down the problem, use of debuggers and other tools (commercial as well as free).  Memory, how to measure and analyze memory usage.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Performance Tuning''' -- A discussion of measuring, profiling, and tuning AOLserver and your application&lt;br /&gt;
&lt;br /&gt;
This might be a little old by now, but it's still an excellent read: [[AOLserver Tuning, Troubleshooting and Scaling]] by [[Kriston J. Rehberg]].&lt;br /&gt;
&lt;br /&gt;
See also: [[nstelemtry]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''Graphing / Charting with AOLserver''' -- Options and examples of integrating various graphing packages with AOLserver.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* [[nschartdir]], using [http://www.crystalballinc.com/vlad/software ChartDirector]&lt;br /&gt;
* [[nsgdchart]], using [http://www.crystalballinc.com/vlad/software GD Charts]&lt;br /&gt;
* [http://develop.sussdorff-roy.com:8011/tgdcharts tgdcharts]&lt;br /&gt;
* [http://www.infosoftglobal.com/ FusionCharts]&lt;br /&gt;
* [http://sourceforge.net/projects/plplot PlPlot]&lt;br /&gt;
* [http://www.gnuplot.info/ GNUPlot]&lt;br /&gt;
* [http://rubick.com:8002/openacs/graphing Competitive analysis of graphing solutions on Aolserver/OpenACS]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5136</id>
		<title>AOLserver Developer's Guide</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5136"/>
		<updated>2008-04-16T19:20:30Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''(Lets not split these into seperate pages until there's enough content.)''&lt;br /&gt;
* [[AOLserver and Tcl Crash Course]] - A Programmer's Introduction (Outline)&lt;br /&gt;
* '''AOLserver Internals''' -- a guide to common [[data structures]], a description of the lifetimes of a [[thread]], an [[interpreter]], a [[request]], and a [[connection]].  Discussions of memory allocation.  The [[Private C API]].&lt;br /&gt;
* '''AOLserver and Tcl''' -- Expanded conversation about integration of AOLserver and [[Tcl]].  Issues of multi-threaded Tcl; the Tcl Library; the lifecycle of a Tcl Interp including initialization, synchronization with other threads, interthread communication, and Tcl Interp cleanup and teardown.  The [[Tcl API]].&lt;br /&gt;
* '''AOLserver and other [[languages]]''' -- a discussion of how AOLserver integrates with [[PHP]], [[Python]], [[Java]], etc. and how these language implementations differ from AOLserver Tcl's implementation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Configuration''' -- a walk-through of the basic steps to properly configure AOLserver, from database pools to virtual hosting.&lt;br /&gt;
** Here's a starter for [[Virtual Hosting]] in AOLserver 3.x and 4.x.&lt;br /&gt;
** [[Module inclusion]] and how your files are treated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver in a multi-server environment''' -- so you've outgrown one server, a discussion of AOLserver in a multi-server environment, including load balancing, clustering, session management, logging, and database replication&lt;br /&gt;
* '''AOLserver Development''' -- AOLserver Best Practices, including application development, emacs hacks, use of the control port, to &lt;br /&gt;
* '''AOLserver Troubleshooting''' -- An enumeration of known problems and suggested fixes.  A discussion of narrowing down the problem, use of debuggers and other tools (commercial as well as free).  Memory, how to measure and analyze memory usage.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Performance Tuning''' -- A discussion of measuring, profiling, and tuning AOLserver and your application&lt;br /&gt;
&lt;br /&gt;
This might be a little old by now, but it's still an excellent read: [[AOLserver Tuning, Troubleshooting and Scaling]] by [[Kriston J. Rehberg]].&lt;br /&gt;
&lt;br /&gt;
See also: [[nstelemtry]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''Graphing / Charting with AOLserver''' -- Options and examples of integrating various graphing packages with AOLserver.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* [[nschartdir]], using [http://www.crystalballinc.com/vlad/software ChartDirector]&lt;br /&gt;
* [[nsgdchart]], using [http://www.crystalballinc.com/vlad/software GD Charts]&lt;br /&gt;
* [http://develop.sussdorff-roy.com:8011/tgdcharts tgdcharts]&lt;br /&gt;
* [http://www.infosoftglobal.com/ FusionCharts]&lt;br /&gt;
* [http://sourceforge.net/projects/plplot PlPlot]&lt;br /&gt;
* [http://www.gnuplot.info/ GNUPlot]&lt;br /&gt;
* [http://rubick.com:8002/openacs/graphing Competitive analysis of graphing solutions on Aolserver/OpenACS]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5135</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5135"/>
		<updated>2008-04-16T19:19:58Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [[somewhere else in the wiki]], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called &amp;quot;Ns_ModuleInit&amp;quot; and an external integer called &amp;quot;Ns_Version&amp;quot;).  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/servers/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/servers/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
NS_EXPORT int&lt;br /&gt;
Foo_ModInit(char* server, char* module)&lt;br /&gt;
{&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5134</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5134"/>
		<updated>2008-04-16T19:10:46Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: First draft. Needs comment &amp;amp; review.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [[somewhere else in the wiki]], a binary module is a dynamically loadable library (.so or .dll) that will be linked into the server at startup (by the fact that it provides an external function called &amp;quot;Ns_ModuleInit&amp;quot; and an external integer called &amp;quot;Ns_Version&amp;quot;).  To get AOLServer to try to link it in:&lt;br /&gt;
# Put the file in the right directory:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
#* (In AOLServer 3.x and below, the convention for the extension for dynamic libraries was to follow the convention of the host operating system; e.g., for Linux/Unix to use &amp;quot;.so&amp;quot; and for Windows to use &amp;quot;.dll&amp;quot;. In AOLServer 4.0 and above, we just use &amp;quot;.so&amp;quot; for all dynamic libraries to simplify the configuration and packaging).&lt;br /&gt;
# Tell AOLServer that it should provide that module to the virtual servers you're configuring.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/server/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''moduleName'' ''locationOfDynamicLibrary?(startupFunction)?''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Each module included into a virtual server has its own configuration ''ns_section'' in the configuration script.  By convention, these sections are named &amp;quot;ns/server/{servername}/module/{moduleName}&amp;quot;, where the moduleName is taken from the ns_param used to include the library in the &amp;quot;modules&amp;quot; section.  Modules usually provide some guidance about how to write this section, perhaps by providing their own &amp;quot;nsd.tcl&amp;quot; files in the module directory.&lt;br /&gt;
&lt;br /&gt;
The library, of course, is only dynamically linked into the AOLServer executable ''once'' (that is the nature of dynamic linking in most operating systems). It is ''initialized'' (that is, its initialization function is called) once per virtual server it is configured into.  There is no mechanism for removing a dynamically loaded module once loaded; the server must be restarted to remove that context.&lt;br /&gt;
&lt;br /&gt;
If a module also contains Tcl components, those should be installed into the appropriate &amp;lt;code&amp;gt;modules/tcl/${moduleName}&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;servers/${servername}/modules/tcl/${moduleName}&amp;lt;/code&amp;gt; directory (as described below).  Configuring AOLServer to use the dynamic library component automatically ensures that the Tcl components will be used as well.&lt;br /&gt;
&lt;br /&gt;
At initialization, all dynamic loading is done before all Tcl module initialization.  Modules are loaded in the order they are listed in the modules section of the configuration file.&lt;br /&gt;
&lt;br /&gt;
Since the dynamic loading is done before Tcl module initialization, a convenient development pattern has emerged in the AOLServer community.  A dynamically loaded module often provides some very general purpose Tcl commands; then its accompanying Tcl files are used to specialize those commands for a particular purpose.  For example, an &amp;quot;nsldap&amp;quot; module may  provide general LDAP interface commands, and then also provide examples, in Tcl, for using those commands to authenticate users, find their groups, etc.&lt;br /&gt;
&lt;br /&gt;
=== Startup Functions &amp;amp; Version Constraints (Ns_ModuleInit and Ns_ModuleVersion) ===&lt;br /&gt;
Each dynamically loaded module must export (in &amp;quot;C&amp;quot; convention) an initialization function that conforms to the typedef Ns_ModuleInitProc. By convention, this startup function is named &amp;quot;Ns_InitProc&amp;quot;, but if a module exports a different name, that can be accomodated in the configuration file (as shown above). Dynamically loaded modules ''should'' export an &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; variable named &amp;lt;code&amp;gt;Ns_ModuleVersion&amp;lt;/code&amp;gt; that describes the version of the module.&lt;br /&gt;
&lt;br /&gt;
The build system for AOLServer 4.x makes this straightforward. Define your module initialization function using any name you'd like (the following is taken from a C++ file):&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
extern &amp;quot;C&amp;quot;&lt;br /&gt;
{&lt;br /&gt;
NS_EXPORT int&lt;br /&gt;
Foo_ModInit(char* server, char* module)&lt;br /&gt;
{&lt;br /&gt;
...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then, in the Makefile for your module, set the MODINIT variable to the name of your function:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
MODINIT = Foo_ModInit&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
== Tcl Modules ==&lt;br /&gt;
Developing Tcl modules for use with AOLServer is just as straightforward, but have some interesting additional features: a Tcl library really can be installed only into the Tcl interpreters for a specific virtual server, and they can usually be reloaded dynamically.&lt;br /&gt;
&lt;br /&gt;
The steps are the same:&lt;br /&gt;
# Put the library in a place AOLServer can find it.&lt;br /&gt;
# Tell your virtual servers they should load it at startup.&lt;br /&gt;
# Restart your server so they do that.&lt;br /&gt;
&lt;br /&gt;
Tcl libraries are usually a set of tcl files, and so are installed into directories named after the library. The directories to use are &amp;quot;${homedir}/modules/tcl/${moduleName}&amp;quot; for libraries that any virtual server may load, or ${homedir}/servers/${servername}/modules/tcl/${moduleName}&amp;quot; for libraries that will only be loaded into specific virtual servers.&lt;br /&gt;
&lt;br /&gt;
If the directory contains a file named &amp;quot;init.tcl&amp;quot;, it will be &amp;quot;sourced&amp;quot; into Tcl interpreters before any other files in that directory.&lt;br /&gt;
&lt;br /&gt;
The syntax for loading pure-Tcl library modules is:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param ''moduleName'' '''Tcl'''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;ns_param nssession Tcl&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
[[Category:Documentation]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5133</id>
		<title>Module inclusion</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Module_inclusion&amp;diff=5133"/>
		<updated>2008-04-16T18:08:37Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: New page: Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are include...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Typical AOLServer modules are written in either Tcl, C, or some combination of those languages (though, of course, new languages can be added via the C module interface).  They are included into your runtime using a section of the [[AOLServer Configuration]] file.&lt;br /&gt;
== Configuring a binary or combined binary &amp;amp; Tcl module into your server ==&lt;br /&gt;
As documented [[somewhere else in the wiki]], a binary module is a dynamically loadable library (.so or .dll) that will be linked into your server at startup.  To get it linked in, you:&lt;br /&gt;
# Put the file in the right directory with an appropriate extension:&lt;br /&gt;
#* In the default configuration of AOLServer, the right place is usually {your installation directory}/bin (e.g., /usr/local/aolserver/lib).  In the AOLServer configuration file, by convention, this directory name is written as &amp;quot;${bindir}&amp;quot;.  Some installations use a separate &amp;quot;${homedir}/lib&amp;quot; (thus ${libdir}) directory.&lt;br /&gt;
# Tell AOLServer it's there, and that you want to use it for your virtual server.&lt;br /&gt;
#* In the modules section associated with your virtual server (e.g., &amp;quot;ns/server/${servername}/modules&amp;quot; in nsd.tcl), add the library using the syntax:&lt;br /&gt;
#*:&amp;lt;code&amp;gt;ns_param   ''configurationSectionName'' ''locationOfDynamicLibrary''&amp;lt;/code&amp;gt;&lt;br /&gt;
#: For example:&lt;br /&gt;
#:&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
    ns_param   nsopenssl &amp;quot;${bindir}/nsopenssl.so&amp;quot;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
# Restart your server. You should see a line that looks like&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
[15/Apr/2008:15:39:35][31632.18446744071924766624][-main-] Notice: modload: loading '/usr/local/aolserver/bin/nsopenssl.so'&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5132</id>
		<title>AOLserver Developer's Guide</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=AOLserver_Developer%27s_Guide&amp;diff=5132"/>
		<updated>2008-04-16T17:49:06Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Added link to new page I'm about to write.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''(Lets not split these into seperate pages until there's enough content.)''&lt;br /&gt;
* [[AOLserver and Tcl Crash Course]] - A Programmer's Introduction (Outline)&lt;br /&gt;
* '''AOLserver Internals''' -- a guide to common [[data structures]], a description of the lifetimes of a [[thread]], an [[interpreter]], a [[request]], and a [[connection]].  Discussions of memory allocation.  The [[Private C API]].&lt;br /&gt;
* '''AOLserver and Tcl''' -- Expanded conversation about integration of AOLserver and [[Tcl]].  Issues of multi-threaded Tcl; the Tcl Library; the lifecycle of a Tcl Interp including initialization, synchronization with other threads, interthread communication, and Tcl Interp cleanup and teardown.  The [[Tcl API]].&lt;br /&gt;
* '''AOLserver and other [[languages]]''' -- a discussion of how AOLserver integrates with [[PHP]], [[Python]], [[Java]], etc. and how these language implementations differ from AOLserver Tcl's implementation&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Configuration''' -- a walk-through of the basic steps to properly configure AOLserver, from database pools to virtual hosting.&lt;br /&gt;
&lt;br /&gt;
** Here's a starter for [[Virtual Hosting]] in AOLserver 3.x and 4.x.&lt;br /&gt;
** [[Module inclusion]] and how your files are treated.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver in a multi-server environment''' -- so you've outgrown one server, a discussion of AOLserver in a multi-server environment, including load balancing, clustering, session management, logging, and database replication&lt;br /&gt;
* '''AOLserver Development''' -- AOLserver Best Practices, including application development, emacs hacks, use of the control port, to &lt;br /&gt;
* '''AOLserver Troubleshooting''' -- An enumeration of known problems and suggested fixes.  A discussion of narrowing down the problem, use of debuggers and other tools (commercial as well as free).  Memory, how to measure and analyze memory usage.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''AOLserver Performance Tuning''' -- A discussion of measuring, profiling, and tuning AOLserver and your application&lt;br /&gt;
&lt;br /&gt;
This might be a little old by now, but it's still an excellent read: [[AOLserver Tuning, Troubleshooting and Scaling]] by [[Kriston J. Rehberg]].&lt;br /&gt;
&lt;br /&gt;
See also: [[nstelemtry]].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
* '''Graphing / Charting with AOLserver''' -- Options and examples of integrating various graphing packages with AOLserver.&lt;br /&gt;
&lt;br /&gt;
Options:&lt;br /&gt;
* [[nschartdir]], using [http://www.crystalballinc.com/vlad/software ChartDirector]&lt;br /&gt;
* [[nsgdchart]], using [http://www.crystalballinc.com/vlad/software GD Charts]&lt;br /&gt;
* [http://develop.sussdorff-roy.com:8011/tgdcharts tgdcharts]&lt;br /&gt;
* [http://www.infosoftglobal.com/ FusionCharts]&lt;br /&gt;
* [http://sourceforge.net/projects/plplot PlPlot]&lt;br /&gt;
* [http://www.gnuplot.info/ GNUPlot]&lt;br /&gt;
* [http://rubick.com:8002/openacs/graphing Competitive analysis of graphing solutions on Aolserver/OpenACS]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_writecontent&amp;diff=5127</id>
		<title>Ns writecontent</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_writecontent&amp;diff=5127"/>
		<updated>2008-04-11T01:20:23Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Filled in the basics from reading the code.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;manpage&amp;gt;ns_writecontent&amp;lt;/manpage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_writecontent - write content of request to Tcl channel&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_writecontent''' ''?conn?'' ''channel''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: ns_writecontent is identical to [[ns_conncptofp]]. It reads the content body of the conn (HTTP request) and copies it to the given Tcl I/O channel.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    @@COMMAND_EXAMPLES@@&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: ns_conncptofp&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
:* Throws the error &amp;quot;could not copy content (likely client disconnect)&amp;quot; if sufficient (based on content-length) content can not be read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_conncptofp&amp;diff=5126</id>
		<title>Ns conncptofp</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_conncptofp&amp;diff=5126"/>
		<updated>2008-04-11T01:17:12Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Wrote a draft of the page based on reading the code. Have not tried to generate examples.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;manpage&amp;gt;ns_conncptofp&amp;lt;/manpage&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_conncptofp - write content of request to Tcl channel&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_conncptofp''' ''?conn?'' ''channel''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: ns_conncptofp is identical to [[ns_writecontent]]. It reads the content body of the conn (HTTP request) and copies it to the given Tcl I/O channel.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
    @@COMMAND_EXAMPLES@@&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: ns_writecontent&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
:* Throws the error &amp;quot;could not copy content (likely client disconnect)&amp;quot; if sufficient (based on content-length) content can not be read.&lt;br /&gt;
&lt;br /&gt;
[[Category:Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5125</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5125"/>
		<updated>2008-02-21T19:19:14Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Added man page link as in the template / conventions, though it's a dead link.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_formvalueput.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
::;radio: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
:Check box &amp;quot;a&amp;quot; from the set a, b:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set checks {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $checks ex a&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot; CHECKED&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of hidden form field &amp;quot;foo&amp;quot; to &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set hidden {&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;}&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $hidden foo bar&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot; value=&amp;quot;bar&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of textarea &amp;quot;textarea&amp;quot; to &amp;quot;new value&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set ta {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $ta textarea {new value}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;new value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
:In AOLServer 4.5.0 (and all previous versions):&lt;br /&gt;
:* Checkboxes are treated exactly like radio buttons. That is, all other boxes with the same name are unchecked. &lt;br /&gt;
:* There is no mechanism for explicitly unchecking a checkbox.&lt;br /&gt;
:* In part because [[ns_tagelement]] does not strip single quotes from attribute values, the type, name, and value attribute values for each element must be either bare or enclosed by double quotes.&lt;br /&gt;
:* [[Ns_formvalueput]] cannot be used with well-formed XHTML 1.0 documents, nor will it create them:&lt;br /&gt;
:** The CHECKED and SELECTED attributes are minimized (i.e., have no value) and are always in upper case. &lt;br /&gt;
:** &amp;lt;nowiki&amp;gt;&amp;lt;input&amp;gt;&amp;lt;/nowiki&amp;gt; elements encoded using the XML syntax &amp;lt;nowiki&amp;gt;&amp;lt;input &amp;lt;/nowiki&amp;gt;'''/&amp;gt;''' will cause syntax errors in the output (the value attribute is inserted between the trailing '''/''' and the trailing '''&amp;gt;''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_tagelement&amp;diff=5124</id>
		<title>Ns tagelement</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_tagelement&amp;diff=5124"/>
		<updated>2008-02-08T21:58:25Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Confirmed the long-speculated bug.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_tagelement.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_tagelement - Find the value of an attribute in an HTML element.&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_tagelement''' ''tag attribute''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command takes a string containing an HTML element, ''tag'', and searches it for the specified ''attribute''.  If the attribute is found, its value is returned.  If the attribute is not found, an empty string is returned.  If the attribute's value is surrounded by double quotes, they will be removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
% set tag {&amp;lt;img height=150 border=&amp;quot;0&amp;quot; class=&amp;quot;c1 c2&amp;quot; src='me.jpg'&amp;gt;}&lt;br /&gt;
&amp;lt;img height=150 border=&amp;quot;0&amp;quot; class=&amp;quot;c1 c2&amp;quot; src='me.jpg'&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% ns_tagelement $tag id&lt;br /&gt;
&lt;br /&gt;
% ns_tagelement $tag border&lt;br /&gt;
150&lt;br /&gt;
&lt;br /&gt;
% ns_tagelement $tag class &lt;br /&gt;
c1 c2&lt;br /&gt;
&lt;br /&gt;
% ns_tagelement $tag src&lt;br /&gt;
'me.jpg'&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
&lt;br /&gt;
: Is not removing single quotes surrounding the value a bug?&lt;br /&gt;
:* [[User:Rcobb|Rick Cobb]] 16:58, 8 February 2008 (EST): Yes. See [[ns_formvalueput]]&lt;br /&gt;
&lt;br /&gt;
'''SEE ALSO'''&lt;br /&gt;
&lt;br /&gt;
: [[ns_tagelementset]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5123</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5123"/>
		<updated>2008-02-08T21:55:45Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
::;radio: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
:Check box &amp;quot;a&amp;quot; from the set a, b:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set checks {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $checks ex a&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot; CHECKED&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of hidden form field &amp;quot;foo&amp;quot; to &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set hidden {&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;}&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $hidden foo bar&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot; value=&amp;quot;bar&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of textarea &amp;quot;textarea&amp;quot; to &amp;quot;new value&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set ta {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $ta textarea {new value}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;new value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
:In AOLServer 4.5.0 (and all previous versions):&lt;br /&gt;
:* Checkboxes are treated exactly like radio buttons. That is, all other boxes with the same name are unchecked. &lt;br /&gt;
:* There is no mechanism for explicitly unchecking a checkbox.&lt;br /&gt;
:* In part because [[ns_tagelement]] does not strip single quotes from attribute values, the type, name, and value attribute values for each element must be either bare or enclosed by double quotes.&lt;br /&gt;
:* [[Ns_formvalueput]] cannot be used with well-formed XHTML 1.0 documents, nor will it create them:&lt;br /&gt;
:** The CHECKED and SELECTED attributes are minimized (i.e., have no value) and are always in upper case. &lt;br /&gt;
:** &amp;lt;nowiki&amp;gt;&amp;lt;input&amp;gt;&amp;lt;/nowiki&amp;gt; elements encoded using the XML syntax &amp;lt;nowiki&amp;gt;&amp;lt;input &amp;lt;/nowiki&amp;gt;'''/&amp;gt;''' will cause syntax errors in the output (the value attribute is inserted between the trailing '''/''' and the trailing '''&amp;gt;''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5122</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5122"/>
		<updated>2008-02-08T21:54:48Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: OK, I think it's correct now :-)&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
::;radio: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&lt;br /&gt;
:Check box &amp;quot;a&amp;quot; from the set a, b:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set checks {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
  }&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $checks ex a&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot; CHECKED&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of hidden form field &amp;quot;foo&amp;quot; to &amp;quot;bar&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set hidden {&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;}&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $hidden foo bar&lt;br /&gt;
  &amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot; value=&amp;quot;bar&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
: Set the value of textarea &amp;quot;textarea&amp;quot; to &amp;quot;new value&amp;quot;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set ta {&amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  % ns_formvalueput $ta textarea {new value}&lt;br /&gt;
  &amp;lt;form&amp;gt;&lt;br /&gt;
  &amp;lt;textarea name=textarea&amp;gt;new value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
  &amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
:In AOLServer 4.5.0 (and all previous versions):&lt;br /&gt;
:* Checkboxes are treated exactly like radio buttons. That is, all other boxes with the same name are unchecked. &lt;br /&gt;
:* There is no mechanism for explicitly unchecking a checkbox.&lt;br /&gt;
:* In part because [[ns_tagelement]] does not strip single quotes from attribute values, the type, name, and value attribute values for each element must be either bare or enclosed by double quotes.&lt;br /&gt;
:* [[Ns_formvalueput]] cannot be used with well-formed XHTML 1.0 documents, nor will it create them:&lt;br /&gt;
:** The CHECKED and SELECTED attributes are minimized (i.e., have no value) and are always in upper case. &lt;br /&gt;
:** &amp;lt;nowiki&amp;gt;&amp;lt;input&amp;gt;&amp;lt;/nowiki&amp;gt; elements encoded using the XML syntax &amp;lt;nowiki&amp;gt;&amp;lt;input &amp;lt;/nowiki&amp;gt;'''/&amp;gt;''' will cause syntax errors in the output (the value attribute is inserted between the trailing '''/''' and the trailing '''&amp;gt;''').&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5121</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5121"/>
		<updated>2008-02-08T21:44:31Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Added examples. Noted a bunch of bugs. Will annotate ns_tagelement too.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
::;radio: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
Check box &amp;quot;a&amp;quot; from the set a, b:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
% set checks {&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot;&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% ns_formvalueput $checks ex a&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;a&amp;quot; CHECKED&amp;gt;a&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;input type=&amp;quot;checkbox&amp;quot; name=&amp;quot;ex&amp;quot; value=&amp;quot;b&amp;quot;&amp;gt;b&amp;lt;/input&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;]&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Set the value of hidden form field &amp;quot;foo&amp;quot; to &amp;quot;bar&amp;quot;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
% set hidden {&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;&amp;gt;}&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot;/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% ns_formvalueput $hidden foo bar&lt;br /&gt;
&amp;lt;input type=&amp;quot;hidden&amp;quot; name=&amp;quot;foo&amp;quot; value=&amp;quot;bar&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
Set the value of textarea &amp;quot;textarea&amp;quot; to &amp;quot;new value&amp;quot;:&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
% set ta {&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;}&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;textarea name=textarea&amp;gt;Old value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&lt;br /&gt;
% ns_formvalueput $ta textarea {new value}&lt;br /&gt;
&amp;lt;form&amp;gt;&lt;br /&gt;
&amp;lt;textarea name=textarea&amp;gt;new value&amp;lt;/textarea&amp;gt;&lt;br /&gt;
&amp;lt;/form&amp;gt;&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
In AOLServer 4.5.0 (and all previous versions):&lt;br /&gt;
* Checkboxes are treated exactly like radio buttons. That is, all other boxes with the same name are unchecked. &lt;br /&gt;
* There is no mechanism for explicitly unchecking a checkbox.&lt;br /&gt;
* In part because [[ns_tagelement]] does not strip single quotes from attribute values, the type, name, and value attribute values for each element must be either bare or enclosed by double quotes.&lt;br /&gt;
* [[Ns_formvalueput]] cannot be used with or to create well-formed XHTML 1.0 documents:&lt;br /&gt;
** The CHECKED and SELECTED attributes are minimized (i.e., have no value) and are always in upper case. &lt;br /&gt;
** &amp;lt;nowiki&amp;gt;&amp;lt;input&amp;gt;&amp;lt;/nowiki&amp;gt; elements encoded using the XML syntax &amp;lt;nowiki&amp;gt;&amp;lt;input &amp;lt;/nowiki&amp;gt;'''/&amp;gt;'''  will cause syntax errors in the output.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5120</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5120"/>
		<updated>2008-02-08T19:09:29Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Oops. Testing examples found problems. THere will be more edits.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
::;radio: will be checked if the NAME attribute matches the ''dataname'' (case insensitive) and the VALUE attribute matches the ''datavalue'' (case-sensitive)&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
* This procedure requires that [[Ns_tagelement]] ''not'' return the trailing ''&amp;gt;'' for elements. That feature of [[Ns_tagelement]] sometimes confuses people.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5119</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5119"/>
		<updated>2008-02-08T19:02:27Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Fixed typo&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given ''datavalue''. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''datavalue'' (case-insensitive)&lt;br /&gt;
::;radio: will be selected if the NAME attribute matches the ''datavalue'' (case-insensitive)&lt;br /&gt;
::;''any other'':If the NAME attribute matches the ''dataname'', the VALUE attribute will be set to the ''datavalue''&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
* This procedure requires that [[Ns_tagelement]] ''not'' return the trailing ''&amp;gt;'' for elements. That feature of [[Ns_tagelement]] sometimes confuses people.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5118</id>
		<title>Ns formvalueput</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_formvalueput&amp;diff=5118"/>
		<updated>2008-02-08T19:01:44Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Framed the page in, documented what I could. Needs examples.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: '''not in source tree'''&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_formvalueput - Sets the value of input elements in HTML documents&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_formvalueput''' ''htmlpiece'' ''dataname'' ''datavalue''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command sets the value of an HTML input element with NAME=''dataname'' (of any type) to the given value. In the following descriptions, all attribute names are handled in case-insensitive fashion (as required by HTML)&lt;br /&gt;
: The elements (tags) &amp;amp; types supported are:&lt;br /&gt;
:* INPUT&lt;br /&gt;
::;image: ignored&lt;br /&gt;
::;submit: ignored&lt;br /&gt;
::;reset: ignored&lt;br /&gt;
::;checkbox: will be checked if the NAME attribute matches the ''datavalue'' (case-insensitive)&lt;br /&gt;
::;radio: will be selected if the NAME attribute matches the ''datavalue'' (case-insensitive)&lt;br /&gt;
::;''any other'':If the NAME attribute matches the ''dataname'', the VALUE attribute will be set to the ''datavalue''&lt;br /&gt;
:* TEXTAREA&lt;br /&gt;
::If the NAME attribute matches the ''dataname'', all the enclosed text up to the next &amp;lt;nowiki&amp;gt;&amp;lt;/textarea&amp;gt;&amp;lt;/nowiki&amp;gt; tag will be replaced by the ''datavalue''.&lt;br /&gt;
:* SELECT&lt;br /&gt;
::If the NAME attribute of the SELECT tag matches the ''dataname'', this will find the first enclosed OPTION tag with a VALUE attribute that matches ''datavalue'', and set its SELECTED attribute. All other enclosed OPTION tags will have their SELECTED attribute removed.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
'''NOTES'''&lt;br /&gt;
* This procedure requires that [[Ns_tagelement]] ''not'' return the trailing ''&amp;gt;'' for elements. That feature of [[Ns_tagelement]] sometimes confuses people.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_hrefs&amp;diff=5117</id>
		<title>Ns hrefs</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_hrefs&amp;diff=5117"/>
		<updated>2008-02-08T18:21:53Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Missed a space in the indenting fix.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_hrefs.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_hrefs - Returns URLs from anchor elements in a chunk of HTML&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_hrefs''' ''html''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command finds the anchor elements (&amp;lt;A&amp;gt;) in a chunk of HTML, ''html'', and returns a list of the URLs in those elements' href attributes.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
  % set html {One good website is &amp;lt;A href='http://google.com/'&amp;gt;Google&amp;lt;/A&amp;gt;.&lt;br /&gt;
              Another is &amp;lt;a href='http://www.yahoo.com'&amp;gt;Yahoo!&amp;lt;/a&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
  % ns_hrefs $html&lt;br /&gt;
  http://google.com/ http://www.yahoo.com&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_hrefs&amp;diff=5116</id>
		<title>Ns hrefs</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Ns_hrefs&amp;diff=5116"/>
		<updated>2008-02-08T18:21:15Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: Made the wiki not interpret the HTTP URLs in the example; removed the question about how to do that., indented like examples in ns_http&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Man page: http://aolserver.com/docs/tcl/ns_hrefs.html&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
'''NAME'''&lt;br /&gt;
&lt;br /&gt;
: ns_hrefs - Returns URLs from anchor elements in a chunk of HTML&lt;br /&gt;
&lt;br /&gt;
'''SYNOPSIS'''&lt;br /&gt;
&lt;br /&gt;
: '''ns_hrefs''' ''html''&lt;br /&gt;
&lt;br /&gt;
'''DESCRIPTION'''&lt;br /&gt;
&lt;br /&gt;
: This command finds the anchor elements (&amp;lt;A&amp;gt;) in a chunk of HTML, ''html'', and returns a list of the URLs in those elements' href attributes.&lt;br /&gt;
&lt;br /&gt;
'''EXAMPLES'''&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;lt;nowiki&amp;gt;&lt;br /&gt;
   % set html {One good website is &amp;lt;A href='http://google.com/'&amp;gt;Google&amp;lt;/A&amp;gt;.&lt;br /&gt;
               Another is &amp;lt;a href='http://www.yahoo.com'&amp;gt;Yahoo!&amp;lt;/a&amp;gt;}&lt;br /&gt;
&lt;br /&gt;
   % ns_hrefs $html&lt;br /&gt;
   http://google.com/ http://www.yahoo.com&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[[Category Documentation]] - [[Category Core Tcl API]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=User:Rcobb&amp;diff=5105</id>
		<title>User:Rcobb</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=User:Rcobb&amp;diff=5105"/>
		<updated>2007-12-05T03:53:33Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Rick Cobb is System Architect @ [http://www.knownow.com KnowNow]. KnowNow's Enterprise Syndication Server, available in both hosted and installed editions, is based on AOLServer, plus a large number of added C++, Tcl, Javascript, .NET, and Java components (some installed into AOLServer, many not).&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Talk:Ns_url2file&amp;diff=5104</id>
		<title>Talk:Ns url2file</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Talk:Ns_url2file&amp;diff=5104"/>
		<updated>2007-12-05T03:43:53Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: What happens to special characters?&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== What happens to special characters? ==&lt;br /&gt;
&lt;br /&gt;
If the url contains, e.g., the '+' character or the sequence '%20', does ns_url2file unencode it the same as the underlying page finding code does?&lt;br /&gt;
&lt;br /&gt;
In AOLServer 3.4.2, it doesn't look like it does.  Say I request the url '/foo%20bar.html'. If I use a Tcl library function as a &amp;quot;404&amp;quot; handler (using the file-system-as-cache technique), and generate my file via &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
set file [open &amp;quot;[ns_url2file $url]&amp;quot; w]&lt;br /&gt;
puts $file $content&lt;br /&gt;
close $file&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Then the '$url' is still Not Found on the next request.  I'm getting the URL by directly reading the request header (since I'm in a redirection routine, the value of [ns_conn url] is my redirected URL, not the URL originally requested).&lt;br /&gt;
&lt;br /&gt;
Thought I'd ask here since it would be nice if the wiki page got updated with the answer....&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=Modules&amp;diff=5086</id>
		<title>Modules</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=Modules&amp;diff=5086"/>
		<updated>2007-08-08T19:11:47Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Miscellaneous */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''See also: [[Toolkits]] and [[Languages]]''&lt;br /&gt;
&lt;br /&gt;
''[[Jamie Rasmussen]] maintains a list of AOLserver modules tested against Windows[http://empoweringminds.spd.dcu.ie/openacs/aolserver_modules].  (Not recently updated - JR)''&lt;br /&gt;
&lt;br /&gt;
== Standard Modules ==&lt;br /&gt;
&lt;br /&gt;
AOLserver ships with the following modules:&lt;br /&gt;
&lt;br /&gt;
* [[nscgi]] -- Standard CGI support for running external C programs, perl scripts etc.&lt;br /&gt;
* [[nscp]] -- Admin/debug support via a telnet like interface into a running server.&lt;br /&gt;
* [[nsdb]] -- The database interface, loads database specific drivers (below).&lt;br /&gt;
* [[nsext]] -- Communicates with external database drivers via proxy daemon.&lt;br /&gt;
* [[nslog]] -- Common log format or extended common log format access logging.&lt;br /&gt;
* [[nsperm]] -- Access control lists for groups/users, supports basic auth.&lt;br /&gt;
* [[nssock]] -- Standard [[socket driver]], used for HTTP requests.&lt;br /&gt;
* [[nsssl]] -- SSL [[socket driver]], links against proprietary RSA BSAFE library (not supplied).&lt;br /&gt;
&lt;br /&gt;
== Database Drivers ==&lt;br /&gt;
&lt;br /&gt;
AOLserver database drivers are either internal or external.  Internal drivers are shared libraries that are loaded in-process with the webserver -- they provide the best performance.  External drivers are shared libraries which are loaded by the AOLserver database proxy daemon [[nsext]], which communicates with the webserver process via sockets.  The advantage of running the database driver external to the webserver is that it isolates buggy, non-threadsafe database access libraries.  These days however this is largely unneccessary, and the external drivers are usually slower due to context switching overhead.&lt;br /&gt;
&lt;br /&gt;
* [[nsfb]] -- Internal '''Firebird|Interbase''' driver.&lt;br /&gt;
* [[dqd_db2]] -- Internal '''IBM DB2''' driver (unmaintained).&lt;br /&gt;
* [[nsberkeleydb]] -- Internal '''BerkeleyDB''' driver.&lt;br /&gt;
* [[nsfreetds]] -- Internal MS '''SQL Server'''/'''Sybase''' driver.&lt;br /&gt;
* [[nsinformix]] -- Internal '''Informix''' driver.&lt;br /&gt;
* [[nsingres]] -- Internal '''Ingres r3''' driver.&lt;br /&gt;
* [[nsibasepd]] -- External '''Interbase''' driver.&lt;br /&gt;
* [[nsmysql]] -- Internal '''MySQL''' driver.&lt;br /&gt;
* [[nsodbc]] -- Internal '''ODBC''' driver.&lt;br /&gt;
* [[nsoracle]] -- Internal '''Oracle''' driver.&lt;br /&gt;
* [[nspostgres]] -- Internal '''PostgreSQL''' driver.&lt;br /&gt;
* [[nssolid]] -- Internal '''Solid''' driver.&lt;br /&gt;
* [[nssqlite2]] -- Internal '''SQLite v2''' driver.&lt;br /&gt;
* [[nssqlite3]] -- Internal '''SQLite v3''' driver.&lt;br /&gt;
* [[nsunixodbc]] -- Internal ODBC driver which uses the '''unixODBC''' driver.&lt;br /&gt;
&lt;br /&gt;
== Encryption / Security ==&lt;br /&gt;
&lt;br /&gt;
* [[nsblowfish]] -- Encrypt Tcl strings with Blowfish cypher and hex encode.&lt;br /&gt;
* [[nsencrypt]] -- Uses OpenSSL to encrypt using the AES, Blowfish, Cast5, IDEA and DES cyphers.&lt;br /&gt;
* [[nsnss]] -- New SSL [[socket driver]], links against Netscape's portable runtime (NSPR) and security services (NSS) libraries.&lt;br /&gt;
* [[nsopenssl]] -- SSL [[socket driver]] links against OpenSSL, and also provides client connection capabilities.&lt;br /&gt;
* [[nspasswd]] -- CRYPT, MD5, SMD5, SHA and SSHA hashing algorithms.&lt;br /&gt;
* [[nssha1]] -- AOLserver module to perform SHA1 hashes.&lt;br /&gt;
* [[nspam]] -- Interface to Pluggable Authentication Modules (PAM).&lt;br /&gt;
* [[nsdigest]] -- Access control lists for groups/users (like [[nsperm]]), supports digest authentication.&lt;br /&gt;
* [[nsmhash]] -- Implementation of mhash library interface to hash, hmac and keygen algorithms (MD5,SHA1, ...). Available shared with nsv_*.&lt;br /&gt;
* [[nsmcrypt]] -- Implementation of mcrypt library interface to crypt,decrypt algorithms (blowfish, des, ...). Available shared with nsv_*.&lt;br /&gt;
&lt;br /&gt;
== Virtual Hosting ==&lt;br /&gt;
&lt;br /&gt;
AOLserver 2.x and 4.x have built-in support for software or name-based [[virtual hosting]], but AOLserver 3.x does not.  Hardware virtual hosting (each server on its own port or IP) is supported across all three versions.&lt;br /&gt;
&lt;br /&gt;
* [[nsvhr]] -- Redirecting proxy, passes virtualy hosted requests back to standalone server.&lt;br /&gt;
* [[nsunix]] -- [[socket driver]] for unix domain sockets, complements '''nsvhr'''.&lt;br /&gt;
* Patches to nsvhr and nsunix by [[Jerry Asher]] [http://web.hollyjerry.org:16080/]&lt;br /&gt;
* [[nssmartvh]] -- C and Tcl based smart virtual hosting module, by [[Zoro]]&lt;br /&gt;
* [[vat]] -- Tcl based Vhost Abstract Template Module, by [[Tom Jackson]]&lt;br /&gt;
* C-based virtual hosting module [http://deadlock.et.tudelft.nl/~daniel/vhost.html]&lt;br /&gt;
* [[nsvirthost]]&lt;br /&gt;
&lt;br /&gt;
== Charting ==&lt;br /&gt;
&lt;br /&gt;
* [[nsgdchart]] -- Generate png/jpg charts using open source gd library.&lt;br /&gt;
* [[nschartdir]] -- Generate charts using proprietary ChartDirector library.&lt;br /&gt;
* [[nsgd]] -- Generate png,jpg,wbmp,gif,... images using open source gd library.&lt;br /&gt;
* [[nsgraph]] -- &lt;br /&gt;
* i-no graphing module using gd library (defunct: [http://www.i-no.com/art/inochart.html])&lt;br /&gt;
&lt;br /&gt;
== XML ==&lt;br /&gt;
&lt;br /&gt;
* [[tDOM]] -- a Tcl extension which provides XML/XSLT functionality.&lt;br /&gt;
* [[nsxml]] -- &lt;br /&gt;
* [[nsexpat]] -- Interface to Expat&lt;br /&gt;
&lt;br /&gt;
== Web Services ==&lt;br /&gt;
&lt;br /&gt;
* [[nssoap]] -- ''unfinnished, unsupported''&lt;br /&gt;
* [[nsxmlrpc]] -- XML-RPC server and client API [http://openacs.org/sdm/one-package.tcl?package_id=12]&lt;br /&gt;
&lt;br /&gt;
== WebDAV ==&lt;br /&gt;
&lt;br /&gt;
* [[nsdav]] -- Port of Apache's WebDAV [http://www.webdav.org/mod_dav/] support for AOLserver.&lt;br /&gt;
* [[nswebdav]] -- &lt;br /&gt;
* [[tDAV]] -- A WebDAV server module that uses [[tDOM]].&lt;br /&gt;
&lt;br /&gt;
== Miscellaneous ==&lt;br /&gt;
&lt;br /&gt;
* [[dqd_log]] -- Makes AOLserver log to a file descriptor.&lt;br /&gt;
* [[dqd_threadpool]] -- Job scheduling system with Tcl interface.&lt;br /&gt;
* [[dqd_utils]] -- collection of half a dozen small utility procs.&lt;br /&gt;
* [[nsadmin]] -- Database admin/log viewing features from v2 ported to v3.&lt;br /&gt;
* [[nsaspell]] -- Aspell Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nsbinarysupport]] -- Write 8bit strings to connection without translation.&lt;br /&gt;
* [[nscache]] -- Tcl interface to AOLserver's caching API&lt;br /&gt;
* [[nsclamav]] -- ClamAV Anti-Virus Interface Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nsdci]] -- AOL's Digital City extensions (distributed cache, among other goodies) (http://code.google.com/p/nsdci/)&lt;br /&gt;
* [[nsdns]] -- DNS Server/Proxy Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nsdqe]] -- Collection of utilities including caching, page counter, virtual hosting etc.&lt;br /&gt;
* [[nsexample]] -- An example module to help guide new module writers.&lt;br /&gt;
* [[nsfortune]] - Fortune like game module, uses real fortune files&lt;br /&gt;
* [[nsftp]] -- FTP server front end for AOLserver.&lt;br /&gt;
* [[nsfts]] -- Interface to Postgres full text search engine.&lt;br /&gt;
* [[nsimage]] -- returns sizes of various modules, implements [[ns_image]] &amp;amp; [[ns_pngsize]], replaces  [[ns_jpegsize]] &amp;amp; [[ns_gifsize]]&lt;br /&gt;
* [[nsimap]] -- IMAP Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nsjabber]] --&lt;br /&gt;
* [[nsjk2]] -- Jakarta connector&lt;br /&gt;
* [[nsldap]] -- LDAP client&lt;br /&gt;
* [[nsmaverix]] -- SMTP Proxy with anti-spam/anti-virus/whitelist/greylist/blacklist capabilities and Web interface [http://www.crystalballinc.com/vlad/software/maverix/]&lt;br /&gt;
* [[nsmsg]] - IPC message module for AOLserver&lt;br /&gt;
* [[ns_pkg]] -- Dynamic Tcl package loading.&lt;br /&gt;
* [[nspool]] -- Pools of sockets, pipes and external processes.&lt;br /&gt;
* [[nsprofile]] -- Time execution of Tcl commands.&lt;br /&gt;
* [[nsreturnz]] -- Gzip content encoding for dynamic requests.&lt;br /&gt;
* [[nsrewrite]] -- &lt;br /&gt;
* [[nsroaming]] -- Netscape Navigator 4 Roaming Profiles.&lt;br /&gt;
* [[nssavi]] -- SOPHOS Anti-Virus Interface Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nssession]] -- Session Management&lt;br /&gt;
* [[nssession (C module)]] -- Sessions implemented as a C module&lt;br /&gt;
* [[nssnmp]] -- SNMP Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nssys]] - Unix system calls, including chmod, ioctl, fsstat, syslog, signal&lt;br /&gt;
* [[nstelemetry]] -- &lt;br /&gt;
* [[nsthreadpool]] -- &lt;br /&gt;
* [[nsuuid]] -- UUID generator module&lt;br /&gt;
* [[nszlib]] -- Zlib Module [http://www.crystalballinc.com/vlad/software/]&lt;br /&gt;
* [[nsperl]] -- Embedded Perl module (not production ready) [http://jam.sessionsnet.org/files/file?file_id=5477]&lt;br /&gt;
&lt;br /&gt;
== Additional Software ==&lt;br /&gt;
&lt;br /&gt;
* [[jk-voting]] -- Example DB based Voting Booth&lt;br /&gt;
* [http://bas.scheffers.net/aolserver/ Cache Tools], by [[Bas Scheffers]] -- I haven't worked with this or tested it in years, would like to hear from users!&lt;br /&gt;
* Tcl AutoLoader for AOLServer by Hal Heisler [http://www.heisler.net/hal]&lt;br /&gt;
* AOLserver 3.x Remote Administration Modules [http://www.scriptkitties.com/]&lt;br /&gt;
* HTTP Cookie Library [http://www.scriptkitties.com/]&lt;br /&gt;
* Simple-Templating System [http://www.oakroad.net/simple-templates/]&lt;br /&gt;
* [[nstest]]&lt;br /&gt;
* [[William Webb]] has a list of some unmaintained AOLserver software he created which may still be useful to you.&lt;br /&gt;
* AM.net[http://aolserver.am.net] maintains a page of AOLserver resources which includes an [[ADP]] pareser module and a module which fetches web pages.&lt;br /&gt;
&lt;br /&gt;
[[Category:Documentation]]&lt;br /&gt;
[[Category:Modules]]&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=What%27s_new_in_4.5&amp;diff=5085</id>
		<title>What's new in 4.5</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=What%27s_new_in_4.5&amp;diff=5085"/>
		<updated>2007-08-02T20:34:35Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Connection Management: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a partial list of new features and major changes in AOLserver 4.5 (compared to 4.0).  If you know of anything that is missing, please add it.&lt;br /&gt;
&lt;br /&gt;
=== Connection Management: ===&lt;br /&gt;
&lt;br /&gt;
These two commands can be used together to map slow running requests to a specific pool and to set limits to avoid overload.&lt;br /&gt;
&lt;br /&gt;
* New '''ns_pools''' command to map method/URL's to specific thread pools.&lt;br /&gt;
* New '''ns_limits''' command  control the number of threads executing and/or waiting for execution by method/URL.&lt;br /&gt;
*'''Note:''' The new scheme does not pick up connection thread pool configurations from earlier versions of AOLServer. Please see the new example configuration files, and the documentation for [[ns_pools]] and [[ns_limits]], for instructions in upgrading your configuration.  &lt;br /&gt;
** As of 1 August 2007, the HEAD revision contains &amp;quot;pools.tcl&amp;quot;, which will handle many pre-4.5 configurations.&lt;br /&gt;
** There are known issues when using this feature in conjunction with virtual servers; see the SourceForge bug list (and development mailing list archive) for details.&lt;br /&gt;
&lt;br /&gt;
=== I/O Features: ===&lt;br /&gt;
&lt;br /&gt;
* New '''Ns_QueueWait''' API to enable event-driven callbacks in the driver thread before dispatching to pools for processing.&lt;br /&gt;
&lt;br /&gt;
:The allows drivers to augment data received from the client (headers, request, content) with additional data fetched over the network (likely stored in the new Ns_Cls &amp;quot;connection local storage&amp;quot; API's) before dispatching to the connection threads.  An example would be to add certain personalization data received via a web service. The rationale here is that I/O events are cheap so do those upfront instead of having expensive connection threads burdened with wasteful blocking I/O.  This is a somewhat obscure and technical interface.&lt;br /&gt;
&lt;br /&gt;
* Added ability to manage larger file uploads by spooling to a temporary file.&lt;br /&gt;
&lt;br /&gt;
=== ADP Improvements: ===&lt;br /&gt;
&lt;br /&gt;
* Added a new execution caching technique at the '''ns_adp_include''' level which allows you to save the results of execution of an included ADP and includes below that for reuse on subsequent connections up to a specified time.&lt;br /&gt;
* Added '''singlescript''' config option which turns ADP pages into a single script enabling syntax such as &amp;quot;&amp;lt;% foreach e $list { %&amp;gt; element &amp;lt;%= $e %&amp;gt; here &amp;lt;% } %&amp;gt;&amp;quot;.&lt;br /&gt;
* Added output buffer improvements via new Ns_ConnFlush.&lt;br /&gt;
* Added automatic UTF-8 to output charset encoding.&lt;br /&gt;
* Added gzip output compression.&lt;br /&gt;
* Added streaming output in chunked-encoding format instead of the previous &amp;quot;response with no length&amp;quot; HTTP/1.0 method.&lt;br /&gt;
* Enhanced ADP error handling and reporting.&lt;br /&gt;
* Added ability to trace ADP pages.  Trace output is written to the server log.&lt;br /&gt;
&lt;br /&gt;
=== Other Improvements: ===&lt;br /&gt;
&lt;br /&gt;
* New '''Ns_TclRegisterTrace''' API to enable callbacks at key state transition points in a much more natural way.  The [[ns_ictl]] command has been updated to support script-level traces.&lt;br /&gt;
* New '''Ns_Task''' API designed to replace the old Ns_SockCallback API which didn't do a very good job at managing timeouts along with I/O events.&lt;br /&gt;
* New '''ns_returnmoved''' command to return 301 http status code and redirect to a new URL.&lt;br /&gt;
* New '''ns_cache''' command based on ideas from the ns_cache module.   This is not backward compatible with the ns_cache module.&lt;br /&gt;
* New '''ns_loop_ctl''' command to monitor and manage ''for'', ''while'', and ''foreach'' loops.&lt;br /&gt;
* Added '''ns_ictl package''' subcommand to [[ns_ictl]] command to handle loading of Tcl packages.&lt;br /&gt;
* Added new '''ns_register_fastpath''' command to re-enable fastpath after a previous call to '''ns_register_proc'''.&lt;br /&gt;
* Added ability to access more AOLserver functionality from a tclsh (nsv_*, ns_thread, etc).&lt;br /&gt;
* Stack checking has returned.  In a multi-threaded application like AOLserver, stack checking is important for detecting buffer overruns and deep call trees blowing your thread stack, etc.&lt;br /&gt;
* More detailed information when logging uncaught Tcl errors.  Especially for connection threads, details of the HTTP request are logged to make diagnosing the root cause of errors easier.&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
	<entry>
		<id>https://panoptic.com/mediawiki/aolserver/index.php?title=What%27s_new_in_4.5&amp;diff=5084</id>
		<title>What's new in 4.5</title>
		<link rel="alternate" type="text/html" href="https://panoptic.com/mediawiki/aolserver/index.php?title=What%27s_new_in_4.5&amp;diff=5084"/>
		<updated>2007-08-02T20:32:07Z</updated>

		<summary type="html">&lt;p&gt;Rcobb: /* Connection Management: */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a partial list of new features and major changes in AOLserver 4.5 (compared to 4.0).  If you know of anything that is missing, please add it.&lt;br /&gt;
&lt;br /&gt;
=== Connection Management: ===&lt;br /&gt;
&lt;br /&gt;
These two commands can be used together to map slow running requests to a specific pool and to set limits to avoid overload.&lt;br /&gt;
&lt;br /&gt;
* New '''ns_pools''' command to map method/URL's to specific thread pools.&lt;br /&gt;
* New '''ns_limits''' command  control the number of threads executing and/or waiting for execution by method/URL.&lt;br /&gt;
*'''Note:''' The new scheme does not pick up connection thread pool configurations from earlier versions of AOLServer. Please see the new example configuration files, and the documentation for [[ns_pools]] and [[ns_limits]], for instructions in upgrading your configuration.  There are known issues when using this feature in conjunction with virtual servers; see the SourceForge bug list (and development mailing list archive) for details.&lt;br /&gt;
&lt;br /&gt;
=== I/O Features: ===&lt;br /&gt;
&lt;br /&gt;
* New '''Ns_QueueWait''' API to enable event-driven callbacks in the driver thread before dispatching to pools for processing.&lt;br /&gt;
&lt;br /&gt;
:The allows drivers to augment data received from the client (headers, request, content) with additional data fetched over the network (likely stored in the new Ns_Cls &amp;quot;connection local storage&amp;quot; API's) before dispatching to the connection threads.  An example would be to add certain personalization data received via a web service. The rationale here is that I/O events are cheap so do those upfront instead of having expensive connection threads burdened with wasteful blocking I/O.  This is a somewhat obscure and technical interface.&lt;br /&gt;
&lt;br /&gt;
* Added ability to manage larger file uploads by spooling to a temporary file.&lt;br /&gt;
&lt;br /&gt;
=== ADP Improvements: ===&lt;br /&gt;
&lt;br /&gt;
* Added a new execution caching technique at the '''ns_adp_include''' level which allows you to save the results of execution of an included ADP and includes below that for reuse on subsequent connections up to a specified time.&lt;br /&gt;
* Added '''singlescript''' config option which turns ADP pages into a single script enabling syntax such as &amp;quot;&amp;lt;% foreach e $list { %&amp;gt; element &amp;lt;%= $e %&amp;gt; here &amp;lt;% } %&amp;gt;&amp;quot;.&lt;br /&gt;
* Added output buffer improvements via new Ns_ConnFlush.&lt;br /&gt;
* Added automatic UTF-8 to output charset encoding.&lt;br /&gt;
* Added gzip output compression.&lt;br /&gt;
* Added streaming output in chunked-encoding format instead of the previous &amp;quot;response with no length&amp;quot; HTTP/1.0 method.&lt;br /&gt;
* Enhanced ADP error handling and reporting.&lt;br /&gt;
* Added ability to trace ADP pages.  Trace output is written to the server log.&lt;br /&gt;
&lt;br /&gt;
=== Other Improvements: ===&lt;br /&gt;
&lt;br /&gt;
* New '''Ns_TclRegisterTrace''' API to enable callbacks at key state transition points in a much more natural way.  The [[ns_ictl]] command has been updated to support script-level traces.&lt;br /&gt;
* New '''Ns_Task''' API designed to replace the old Ns_SockCallback API which didn't do a very good job at managing timeouts along with I/O events.&lt;br /&gt;
* New '''ns_returnmoved''' command to return 301 http status code and redirect to a new URL.&lt;br /&gt;
* New '''ns_cache''' command based on ideas from the ns_cache module.   This is not backward compatible with the ns_cache module.&lt;br /&gt;
* New '''ns_loop_ctl''' command to monitor and manage ''for'', ''while'', and ''foreach'' loops.&lt;br /&gt;
* Added '''ns_ictl package''' subcommand to [[ns_ictl]] command to handle loading of Tcl packages.&lt;br /&gt;
* Added new '''ns_register_fastpath''' command to re-enable fastpath after a previous call to '''ns_register_proc'''.&lt;br /&gt;
* Added ability to access more AOLserver functionality from a tclsh (nsv_*, ns_thread, etc).&lt;br /&gt;
* Stack checking has returned.  In a multi-threaded application like AOLserver, stack checking is important for detecting buffer overruns and deep call trees blowing your thread stack, etc.&lt;br /&gt;
* More detailed information when logging uncaught Tcl errors.  Especially for connection threads, details of the HTTP request are logged to make diagnosing the root cause of errors easier.&lt;/div&gt;</summary>
		<author><name>Rcobb</name></author>
		
	</entry>
</feed>