tcl-websh-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <>
Subject Re: Question about interpreters
Date Mon, 26 Oct 2009 15:50:07 GMT
> I have the following problem(s)


> I don't know what the heck is wrong, or how to use the interpreters
> or why they're needed, where they're needed .. how to combine them
> cause it seems not to display my pages correctly. I read the quick
> reference before but it took me lots of hours to figure out some
> things. Could it be because I'm on vista? Even sessions seemed to
> work weird, and without a proper interpreter I felt lost so I
> stopped using Websh.

I don't see anything that's obviously wrong in your code. (Well, there
isn't much code ;-)

Does the sample installation w/o changing anything (except maybe
settning webshroot correctly in websh.conf) work? What is the
output of using the sample as-is? Any logs in the Apache error log?

The poin twith the interpreters is: with 

proc web::interpmap {file} {
     # return interp class for request to file
     return $file

you define which interpreter(s) handle which requests. The sample uses
2 defined interpreter classes (i.e. interpreterr that run the same
code for same set of requests) and all *.ws3 requests are handled by
their own class):

  otherhandler.ws3: running requests to any file called other.html

  htmlhandler.ws3: running requests to any *.html file (except the above)

  *.ws3: each *.ws3 has it's own interpreter, which just runs the file itself

So the interpreter thing lets you decide which requests should be
handled by which code.

proc web::interpmap {file} {
     return myCode.tcl

Would instead run every request through the same code no matter which
request is sent to mod_websh from the server (configured with the
AddHandler directive...)

Ronnie Brunner |
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message