# register the websh command "pricelist" web::command pricelist { # web::put sends string to the default output channel # (stdout in the CGI case), including HTTP headers web::put {

price list

} # web::cmdurl produces a URL with querystring. In this case, # we just want to switch back to "default", that's why we omit # an explicit command name and just use "" web::put "back" } # register the websh command "default" web::command default { # welcome note web::put {

hello, customer

} # link to an other HTML page of this application, the price list. # We generate the URL using web::cmdurl and specify the command # to be used: it is called pricelist and has been defined above. web::put "price list" } # do the command dispatching # this will switch into "pricelist" or "default" depending on # the query_string web::dispatch