I found a bunch of wub examples on the wubwikit site (linked to from
the wub wiki page).
http://code.google.com/p/wubwikit/downloads/list Follow that link and
download either eurotcl2009-examples.zip
I downloaded those examples but none of them work. I believe it's
because of the changes that have been made to the way Config works.
Is there an easy way to mimic example #1.
--------------- ex.tcl ----- from ex1 directory ---------
lappend auto_path ../Wub ../tcllib/modules .
package require Site
Site start home .
-------------------
There is a docroot under the current directory that contains html
files.
I think if this example worked, I'd be able to navigate to
http://localhost:8080/html/ex.html
What is the new process for setting up this minimal configuration if I
have a docroot filled with static .html files, and i want those files
mounted at / (
http://localhost:8080/)?
I tried creating the following Application.tcl
-----------Application.tcl -----------------------
#! /usr/bin/env tclsh
## My Application needs to know how to find Site.tcl.
lappend auto_path [file join [file dirname [info script]] ../Wub]
package require Site
Site start home .
------ end Application.tcl -------------------
and the following Site.config
---------------site.config -----------------------
Wub {
globaldocroot 1; # do we use Wub's docroot, or caller's
docroot [file join [file dirname [info script]] docroot]; #
essentially ./docroot
}
/ {
domain File
root $Wub::docroot
}
default {
url default
code {set r [Http NotFound $r]; <p> "[dict get $r -uri] Not
Found... [clock format [clock seconds]]"}
}
------------------ end site.config -------------------
when I navigation to "/", I keep getting the 'not found' response from
default.
I am able to get static pages served up if I set up a file File domain
on something besides "/"
for instance,
/myApp/ {
domain File
root $Wub::docroot
}
will work if I navigate to
http://localhost:8080/myApp/
Just curious if I'm doing something obviously wrong, or if you just
aren't allowed to hang a File domain off of "/".
Thanks in advance for any advice.
MB