The Java configuration elements are as follows:
Defines configurable properties for the integrated Java Virtual Machine (JVM), and for Java-based security and resources.
The following table describes subelements for the JAVA element.
Table 2–29 JAVA Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
|
zero or more |
Contains JVM command line options. |
|
zero or one |
Configures a profiler for use with the server. |
|
zero or one |
Defines parameters and configuration information needed by the security service. |
|
zero or one |
Specifies configured resources. |
The following table describes attributes for the JAVA element.
Table 2–30 JAVA Attributes
Attribute |
Default |
Description |
---|---|---|
javahome |
<install-root>/bin/https/jdk For SVR 4 package-based installation for Solaris: /usr/java |
The path to the directory where the JDK is installed. |
debug |
false |
(optional) If true, the server starts up in debug mode ready for attachment with a JPDA-based (Java Platform Debugger Architecture-based) debugger. Legal values are on, off, yes, no, true, false, 1, 0. |
debugoptions |
-Xdebug -Xrunjdwp:transport=dt_socket, server=y,suspend=n |
(optional) Specifies JPDA options. A list of debugging options that you can include is available at: http://java.sun.com/products/jpda/doc/conninv.html#Invocation |
classpathprefix |
none |
(optional) Specifies a prefix for the system classpath. You should only prefix the system classpath if you wish to override system classes, such as the XML parser classes. Use this attribute with caution. |
serverclasspath |
none |
(optional) Specifies the classpath for the environment from which the server was started. This classpath can be accessed using System.getProperty("java.class.path"). |
classpathsuffix |
none |
(optional) Specifies a suffix for the system classpath. |
nativelibrarypathprefix |
none |
(optional) Specifies a prefix for the native library path. The native library path is the automatically constructed concatenation of the path to the server's native shared libraries, the standard JRE (Java Runtime Environment) native library path, the shell environment setting (LD_LIBRARY_PATH on UNIX), and any path specified in the PROFILER element. Since this is synthesized, it does not appear explicitly in the server configuration. |
nativelibrarypathsuffix |
none |
(optional) Specifies a suffix for the native library path. |
envclasspathignored |
true |
(optional) If false, the CLASSPATH environment variable is read and appended to the server classpath. The CLASSPATH environment variable is added after the classpath-suffix, at the very end. For a development environment, this value should be set to false. For a production environment, this value should be set to true to prevent environment variable side effects. Legal values are on, off, yes, no, 1, 0, true, false. |
bytecodepreprocessors |
none |
(optional) A comma-separated list of class names, each of which must implement the com.sun.appserv.BytecodePreprocessor interface. Each of the specified preprocessor classes is called in the order specified. |
dynamicreloadinterval |
2 |
Specifies the interval, in seconds, after which a deployed application is reloaded. |
loglevel |
Value of level attribute of LOG element |
(optional) Controls the type of messages logged by this element to the errors log. For details, see the description of the level attribute of the LOG element. |
Defines configurable system-wide Java VM properties., for example:
<JVMOPTIONS>-Xdebug -Xmx128m</JVMOPTIONS>
In addition, web server looks for a system property, -Dcom.sun.webserv.startupclasses, whose value is a comma-separated list of fully qualified Java classes that server loads into the Virtual Machine upon startup. Example:
<JVMOPTIONS> -Dcom.sun.webserv.startupclasses=com.sample.MyInitializer,com.jdo .PersistenceManagerFactory </JVMOPTIONS>
For information about the available options, see http://java.sun.com/docs/hotspot/VMOptions.html.
(On Windows only). Logging out of the machine where the web server is installed might abort the web server process. To avoid this problem, perform these steps:
Add the following line to the server.xml file of the web server instance.
<JVMOPTIONS>-Xrs</JVMOPTIONS>
Restart the instance.
none
none
Configures a profiler for use with the server.
The following table describes subelements for the PROFILER element.
Table 2–31 PROFILER Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property. |
|
zero or more |
Contains profiler-specific JVM command line options. |
The following table describes attributes for the PROFILER element.
Table 2–32 PROFILER Attributes
Attribute |
Default |
Description |
---|---|---|
classpath |
none |
(optional) Specifies the classpath for the profiler. |
nativelibrarypath |
none |
(optional) Specifies the native library path for the profiler. |
enabled |
true |
(optional) Determines whether the profiler is enabled. Legal values are on, off, yes, no, 1, 0, true, false. |
Defines parameters and configuration information needed by the security service.
The following table describes subelements for the SECURITY element.
Table 2–33 SECURITY Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
|
one or more |
Defines a realm for authentication. |
The following table describes attributes for the SECURITY element.
Table 2–34 SECURITY Attributes
Attribute |
Default |
Description |
---|---|---|
defaultrealm |
file |
(optional) Specifies the default authentication realm (an AUTHREALM name attribute) for this server instance. The default realm will be used to process authentication events for any web applications which do not otherwise specify which realm to use. |
anonymousrole |
ANYONE |
(optional) Used as the name for default, or anonymous, role. The anonymous role is always assigned to all principals. |
audit |
false |
(optional) If true, additional access logging is performed to provide audit information. Legal values are on, off, yes, no, 1, 0, true, false. Audit information consists of:
|
loglevel |
Value of level attribute of LOG element |
(optional) Controls the type of messages logged by this element to the errors log. For details, see the description of the level attribute of the LOG element. |
Defines a realm for authentication.
Authentication realms require provider-specific properties, which vary depending on the needs of a particular implementation.
Here is an example of the default file realm:
<authrealm name="file"
classname="com.iplanet.ias.security.auth.realm.file.FileRealm">
<property name="file" value="instance_dir/config/keyfile">
<property name="jaas-context" value="fileRealm">
</authrealm>
Which properties an AUTHREALM element uses depends on the value of the AUTHREALM element's name attribute. The file realm uses file and jaas-context properties. Other realms use different properties.
The following table describes subelements for the AUTHREALM element.
Table 2–35 AUTHREALM Subelements
Element |
Required |
Description |
---|---|---|
zero or more |
Specifies a property or a variable. |
The following table describes attributes for the AUTHREALM element.
Table 2–36 AUTHREALM Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the name of this realm. |
classname |
none |
Specifies the Java class that implements this realm. |
The standard realms provided have both required and optional properties. A custom realm may have different properties. For details about the properties and configuration characteristics of the AUTHREALM realms, refer to the chapter “Securing Web Applications” in the Sun Java System Web Server 6.1 Programmer's Guide to Web Applications.