[ Previous ] [ Contents ] [ Index ] [ Next ]

ns_register_trace

Overview

Register a Tcl trace script to a method and matching URL

Syntax

ns_register_trace method URLpattern script ?args?

Description

ns_register_trace registers a Tcl script as a trace for the specified method/URL combination. After the server handles the request for the specified method on an URL that matches the URLpattern, it calls the trace script with the connection id and any arguments (args) specified.

The URLpattern can contain standard string-matching characters. For example, these are valid URLpatterns:

    /employees/*.tcl
    /accounts/*/out

Note

ns_register_trace is similar to ns_register_proc except that the pattern-matching for the URL is performed differently. With ns_register_proc, the specified URL is used to match that URL and any URL below it in the hierarchy. Wildcards such as "*" are meaningful only for the final part of the URL, such as /scripts/*.tcl. With ns_register_trace, the URLpattern is used to match URLs as a string with standard string-matching characters.

ns_register_proc results in a single match, whereas multiple ns_register_trace's can be matched and will be called.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1996 America Online, Inc.