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

How to Build and Debug Tcl Scripts

Follow these steps to build and debug your Tcl scripts:

  1. Create a .tcl file containing a Tcl script in the directory specified by the Library parameter (see page 26) for your server. Include a call to ns_register_proc to register your script to an URL or URL hierarchy.

  2. Test your script by accessing an URL that it is registered for. For example, if you registered the hello script to the /example/hello URL as follows:

        ns_register_proc GET /example/hello hello
    

    Then you would test the script by visiting the URL http://yourserver/example/hello.

  3. After testing your script, you may want to make changes to it. Edit the script file and open the URL associated with the script (such as the /example/hello URL in the above example) again in your browser and perform a Reload to see the new results.

Top of Page

[ Previous ] [ Contents ] [ Index ] [ Next ]
Copyright © 1998-99 America Online, Inc.