Back


The Linguist servlet package

The servlet package provides a high-level interface to all needed servlet functions, including the generation of HTML.

These are the keywords supplied for servlet operations:

add Add an item to the document or to an element.
clear Clear the document, a template or an element.
cookie Define a cookie variable.
create Create a cookie with a specified name.
do Force a GET or POST for testing.
element Declare an element variable.
forward Forward the request to the response.
get Get the session object or a cookie.
on Define where to start processing an HTTP GET or POST.
parameter Set a psuedo-parameter for testing.
put Put an item into an element.
set Set various attributes.
start Start up vqServer.
template Define a template variable.
write Write the document to the response stream or to a file.

This section of Linguist is still in development. More keywords will be added as the package is developed.

Numeric and String values
Conditional expressions


Numeric and String Values

These values can be used in either a numeric or string expression:

parameter {name}
Returns the CGI parameter having the given name.

template {file} [where {key} is {value} [and ...]]
Returns a string comprising the contents of the named file with all occurrences of the specified keys replaced by their corresponding values. For more complex page substitutions it is better to use template variables.

the headers
Returns a string comprising the headers associated with this request.

header {name}
Returns the single named header.

encoded {value}
Returns the string given, converted to URL encoding to deal with spaces and other characters.

session value {name}
Returns the named session value.

the session id
Returns the session id, as a convenience.

the server name
Returns the name of the server running this servlet.

the client name
Returns the name of the client making the request.

the client address
Returns the address of the client making the request.

Return to top


Conditional Expressions

the session is new
Returns true if the session has been created in this request.

cookie {cookie} exists/does not exist
Returns true if the named cookie does (or does not) exist.

Return to top


Back