Sample handler for popping up a dialog box on the server.
This is used for interactive authentication of web pages, allowing
an operator on the server's computer to allow or deny access
to pages on a per request basis.
Input parameters examined in the request properties:
prefix
The required URL prefix.
default
The message to appear in the dialog box.
Defaults to Request from Client.
denied
The message to appear in the "permission denied" spot.
If query data is present, it is used as the message.
Note: This is the only class in the entire system that requires AWT.
server - The HTTP server that created this Handler.
Typical Handlers will use Server.props
to obtain run-time configuration information.
prefix - A prefix that this Handler may prepend to all
of the keys that it uses to extract configuration information
from Server.props. This is set (by the Server
and ChainHandler) to help avoid configuration parameter
namespace collisions.
For example, if a Handler uses the property
"account", and the specified prefix is "bank.", then the
Handler should actually examine the property
"bank.account" in Server.props.
Returns:
true if this Handler initialized
successfully, false otherwise. If
false is returned, this Handler
should not be used.
request - The Request object that represents the HTTP
request.
Returns:
true if the request was handled. A request was
handled if a response was supplied to the client, typically
by calling Request.sendResponse() or
Request.sendError.
Throws:
IOException - if there was an I/O error while sending the response to
the client. Typically, in that case, the Server
will (try to) send an error message to the client and then
close the client's connection.
The IOException should not be used to silently
ignore problems such as being unable to access some
server-side resource (for example getting a
FileNotFoundException due to not being able
to open a file). In that case, the Handler's
duty is to turn that IOException into a
HTTP response indicating, in this case, that a file could
not be found.
dismiss
public void dismiss(boolean how)
init
public void init()
Machine generated code.
Everything after here was automatically generated
SpecTcl generated class Dialog, version 1.0