This is the mail archive of the
kawa@sourceware.org
mailing list for the Kawa project.
Re: BRL with kawa 1.8.91
The latest trunk (soon to be Kawa 1.10) has some nice
multi-language servlet support.
For all the details, see:
http://www.gnu.org/software/kawa/server/auto-servlet.html
If the request is for a file with a known extension, such
as ".brl", then that file will be compiled as a "module"
in that language.
Otherwise, it will look at the first line in the file. For example,
if the contents of the file "hello" or "hello.html" is:
<!-- Generated by kawa:brl -->
<b>The result is [(list (symbol->string 'b) 10) (html:i "<ii>")].</b>
Then Kawa knows this is a BRL file.
This provides a simple way to create servlets with "clean" URLs.
Kawa compiles and caches each module. If you modify it,
KawaPageServelet will automtically re-compile it.
One experimental BRL language change that I think is useful
(though if it causes compatibility problems we can change it back):
This version of BRL distinguishes between "foo" and ]foo[.
Special HTML characheters are escaped in "foo", but not
in ]foo[ - and not in the outermost layer outside square
brackets. To distinguish these, ]foo[ gets parsed as an
instance of the special UnescapedData class - which does
implement java.lang.CharSequence, so it acts like a string
in most respects.
This re-implementation of BRL does not support all the
features of "true" BRL, just the basic functionality.
For example reading sitedefs.scm isn't implemented, but
should be easy to add, since "dependencies" are supported.
Neither define-input, define-cgi, or define-cookie are
implemented yet. But I'm interested in working with the
BRL community to "port" the necessary functionality.
--
--Per Bothner
per@bothner.com http://per.bothner.com/