PackageDescription: HttpServerTags

Http Server Tags

Last published: February 27, 2007 by 'michael'

Defines 4 Classes
Extends 5 Classes

Subclasses of ServletTags are used to define a listener for the TagServer as well as servlets that will respond to requests. This is done using pragmas/tags that define the server address. You can implement a class side method on your subclass of ServletTags with the following pragmas:


Transcript cr; show: 'My server has started!'

Then on the instance side of your class, you can implement methods that accept the following pragmas:

Tags to define what you're answering:

Tags to define how you're answering:


contentType: 'text/plain';
bodyBlock: [:stream | stream asStringStream nextPutAll: 'Hello World']

myMethod: writer

writer html body div text: 'Hello World!'

myMethod: writer

writer helloWorld text: 'Hello World!'

myMethod: stream

stream asStringStream nextPutAll: 'Hello World!'


^'Hello World!'

Tags to modify the response and request:


^session id printString

Instance Variables:
interest description of interest
request description of request
response description of response
server description of server
session description of session