Michael isn't sure that servlets are the best way to deal with
web requests, so he's exploring pragmas (or tags) as a way of
approaching the problem. Here's a snippet of his post; I encourage
you to read the whole thing:
So I got thinking about pragmas again - or as Travis wants to
call them: "tags". I thought, what if I could just make one class
and put all these adhoc response methods in there using tags. So
I've come up with a couple of tags you can put in to a subclass of
HttpServerTags.TagServer.
static_content
<get: #('test.txt')>
<string: 'text/plain'>
^'Hello World'
In this simple example we say that we respond to a GET request
with path of /test.txt and our content type is text/plain. When we
request the page, we get back a string of Hello World. Pretty
simple and to the point.
The other examples are far more interesting; head on over and check it out
Technorati Tags:
web