Websh  
product description documentation
resources and links download
We are sorry but we discontinued Websh support and development for lack of resources. Also the discussion mailing list was closed, so if you're interested in taking up this subproject within the Apache Tcl project to bring it back into life please contact private@tcl.apache.org

frequently asked questions


 

Contents

1 Generic Questions
1.1 What is Websh?
1.2 What is the current version?
1.3 What does Websh cost?
1.4 Where can I download Websh?
1.5 Why should I use Websh?
1.6 Is there a mailing list?

2 Technical Questions
2.1 How do I use the logging facility?
2.2 How do I setup mod_websh?
2.3 How do I configure mod_websh for Apache 1 or Apache 2 repectively?

1 Generic Questions

1.1 What is Websh?

Websh is a rapid development environment for building powerful and reliable web applications. It is a standard Tcl extension and is released as Open Source Software. Websh is versatile and handles everything from HTML generation to data-base driven one-to-one page customization. Netcetera has been using it for years in many customer projects, which typically are E-commerce shops or even electronic banking applications.

In addition, Websh provides mod_websh, an Apache module for the Apache 1.3 and Apache 2 web server.

1.2 What is the current version?

Currently, version 3.6 of Websh has been released as Beta (but fully working version). Check the download area to get the latest version.

1.3 What does Websh cost?

Nothing. It's free. Websh is released as Open Source.

1.4 Where can I download Websh?

The latest release of Websh is available for download in the download area of this site.

1.5 Why should I use Websh?

In today's E-commerce environment, flexibility and short time-to-market are key characteristics for successful business. E-commerce, in other words, calls for a solid basis on which applications can be built. For exactly this purpose we have designed Websh.

Websh helps you to create high-quality web applications with light time constraints. It is fast, versatile, scalable, and easy to learn. With Websh, you have a win-win situation for developers and customers.

1.6 Is there a mailing list?

Sure. Visit the subscribe page on this site to get more information.

2 Technical Questions

2.1 How do I use the logging facility?

Before Websh sends a message to a log destination, the message needs to pass two filters. That's why you need to specify a level when you issue a log message. First, Websh decides whether or not to handle the log message. Then, it scrolls through the list of registered log destinations and compares the log message level against the filter of each log destination. The message is sent to the log destination only if the message passes the second filter.

A log level consists of a tag and a level, separated by a dot. Possible levels are
  • alert
  • error
  • warning
  • info
  • debug
The tag is free text. Typically, it is the name of the application, say "foo".

Before log messages can reach their destination, you have to "open up" the log destination, in two steps:
web::loglevel add foo.warning-debug
web::logdest add foo.warning-info file foo_warn.log
web::logdest add foo.debug file foo_dbg.log
This sequence of commands tells Websh to handle all messages in the range "warning" to "debug", if the level string is "foo", and to discard any other messages. Messages of level "debug" are then written to file "foo_dbg.log", while the other messages end up in file "foo_warn.log".

Issuing a message is easy:
web::log foo.info "Hello, world !"

A sample logging setup for a script in mod_websh looks like this:

web::initializer {
    web::logdest add user.-debug file -unbuffered /tmp/test.log
    web::logfilter add *.-debug
    web::log info "initializing interp"
}

web::command default {
    web::log info "command default call number [web::interpcfg  numreq]"
    web::putx "file /tmp/dummypage.html"
}

web::finalizer {
    web::log info "shutting down interp"
}

web::dispatch
This will setup logging when the interpreter is created (during the first request it handles) and later, this logs can be used during the requests. Note that only log levels and log destinations created in the initializer code are accessible in the finalizer. Configurations created during a request is discared when the rquest ends.

2.2 How do I setup mod_websh?

If you compile and install mod_websh, a sample setup for mod_websh is also installed. Please refer to the README file in your installation directory.

2.3 How do I configure mod_websh for Apache 1 or Apache 2 repectively?

Websh will automatically detect whether the header files of Apache 1 or Apache 2 are present and compile accordingly. There is no manual change needed to compile with a specific version. (However a compiled version will only run with the Apache version it was compiled with.)

description | documentation | support | resources | download | credits | copyright

© Websh - an Apache Tcl project - part of the Apache Software Foundation