NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | ATTRIBUTES | FILES | SEE ALSO | NOTES
A servlet engine can be defined on any Sun WebServer server instance or any individual web site. The servlet engine runs a JavaTM virtual machine that loads and executes servlets defined in its servlets.properties file.
The htservlet command defines and modifies servlet engine run time, security, and logging properties; adds or removes entries in the servlets.properties file; and loads or unloads servlets in running servlet engines.
When -h hostname is omitted, the subcommand applies to the shared servlet engine (server-wide setting).
Subcommands
The following subcommands are supported:
You must restart the server in order for the changes made to the configuration files to take effect.
Adds a servlet to the servlets.properties file. Adding a servlet does not imply that the servlet is automatically loaded.
Deletes a servlet from the servlet engine and writes changes to the servlets.properties file.
Disables an option on the servlet engine and writes changes to the configuration file.
Enables an option on the servlet engine and writes changes to the configuration file.
Displays help on usage.
Lists all loaded servlets on the server.
Loads a servlet from the servlets.properties file on a running server.
Configures the log location and cycling parameters and writes changes to the configuration file.
Returns current servlet engine settings on a running server.
Reloads a servlet on a running server.
Configures the security settings for the servlet engine and writes changes to the configuration file.
Specifies the settings on the servlet engine and writes changes to the configuration file.
Unloads a servlet from the running web server.
Displays the version of htservlet.
Options
The following options are supported:
Specifies the optional initial arguments passed to the servlet. Used in the format name=value [[, name=value...]]. Valid with the add and reload subcommands.
Specifies the URL of the servlet's code base. This URL can be pointing to a directory or a jar file. Used only for remote servlets. Valid with the add subcommand.
Specifies the name of the servlet main class file. Valid with the add subcommand.
Specifies the directories and jar files for the servlet engine on the local machine. This is a colon-separated list. This option can only prepend the path specified to the original path in the file. Valid with the settings subcommand.
The path name and the file prefix for servlet log files. As new log files are created, they use this prefix and a number suffix. Valid with the log subcommand.
Specifies a servlet engine option to enable or disable. Valid options are:
Enables or disables servlet chaining. Servlet chains are a sequence of servlets executed in the specified order to fulfill one single servlet request.
Enables or disables the server to enable a jvm. This is a server-wide setting.
Enables or disables servlet error logging.
Enables or disables loading servlets from remote sites in this servlet engine.
Enables or disables the servlet engine for server process or web site.
Allows all sites on the server to share a single servlet engine. This is a server-wide setting. If this option is disabled, each site is allowed to create its own servlet engine instance.
Specifies the name of the virtual host. Valid with all subcommands.
The name of the server instance. Valid with all subcommands.
Specifies the class path for the jvm which may include the location of classes.zip file of JDK, JSDK, and the servlet engine. This is a colon separated list (for example, usr/lib/java/ [[:/usr/java/lib...]]). This command only prepends to the existing path. It is a server-level setting. Valid with the settings subcommand.
Do not put the servlets directories in the server classpath.
Specifies the maximum number of log files. When the log suffix exceeds this number, the next log file is created overwrites the first log file. The default number is 7 files. Valid with the log subcommand.
Specifies the name of the servlet. Valid with the add, delete, load, reload, and unload subcommands.
Specifies the access settings used in conjunction with the -r option. Valid with the security subcommand.
Allows local and remote servlets to access resources.
Allows access only to resources on the same host.
Allows no access.
Allows access only to resources on servlets with a code base.
Specifies the full path to the properties file for the servlet engine. Valid with the settings subcommand.
Disables password prompting, and password is piped ("|") to the command. Valid with the add, delete, disable, enable, load, log, reload, unload, security, and settings subcommands.
Specifies the resource settings used in conjunction with the -o option for access control. Valid with the security subcommand.
Sets access permissions for file resources such as read/write a file on local disk.
Sets access permissions for links to dynamic libraries.
Sets access permissions for network resources.
Sets access permissions for security resources such as classLoaders.
Sets access permissions for system resources such as System.Exec ().
Indicates that the servlet will be loaded at startup. Valid with the add subcommand.
The log cycle time measured in minutes. When the log cycle time exceeds this number, a new log file is created with an incremented suffix. The default time is 1440 minutes (1 day). Valid with the log subcommand.
Specifies user name. Valid with the add, delete, disable, enable, load, log, reload, unload, security, and settings subcommands.
Specifies verbose mode for more detailed messages. Valid with all subcommands.
Specifies the maximum log file size measured in bytes. When the log file size exceeds this number of bytes, a new log file is created with an incremented suffix. The default file size is 1048576 bytes (1 MB). Valid with the log subcommand.
# htservlet enable -g jvm -i sws_server -u admin
To load a declared servlets on a server:
# htservlet load -i sws_server -h www.A.com -n foo -u http
To add servlets to be loaded at startup:
# htservlet add -i sws_server -h www.A.com -n foo \\ -c FooServlet -b http://x.eng/ -a counter=1 -s \\ -u http
To add a servlet declaration (in verbose mode):
# htservlet add -i sws_server -h www.A.com -n foo \\ -c FooServlet -b http://x.eng/ -a counter=1 -v \\ -u http
To set the server classpath:
# htservlet settings -i sws_server -j /usr/jdk/lib/classes/zip:. \\ -u http
See attributes(5) for descriptions of the following attributes:
ATTRIBUTE TYPE | ATTRIBUTE VALUE |
Availability | SUNWhtsvl |
Interface Stability | Evolving |
The following files are used by this utility:
Contains the web site servlet engine configuration if the servlet engine is not shared.
Contains the server instance servlet engine configuration if all web sites share the servlet engine.
Defines each servlet that can be loaded by a web site.
If the command is run by root
user, then the username and password of an administrator are not required.
Users other than root
must use the -z option and pass the user name and password of a valid administrator to the command.
NAME | SYNOPSIS | DESCRIPTION | OPTIONS | EXAMPLES | EXIT STATUS | ATTRIBUTES | FILES | SEE ALSO | NOTES