General elements are as follows:
This element Web Server- specific configuration for a web application. This element is the root element. The sun-web.xml file contain only one sun-web-app.
The following table describes subelements for the sun-web-app element.
Table A–3 sun-web-app Subelements
none
The following table describes the properties for the sun-web-app element.
Table A–4 sun-web-app Properties
Property Name |
Default Value |
Description |
---|---|---|
crossContextAllowed |
true |
If true, allows this web application to access the contexts of other web applications using the ServletContext.getContext() method. |
true |
If true, Web Server URL encodes cookies before sending them to the client. If you don’t want cookies to be encoded, add the following setting to sun-web.xmldirectly under the <sun-web-app> tag: <property name="encodeCookies" value="false"/> Do not embed this setting in any other tag. |
|
tempdir |
instance-dir/generated/ |
Specifies a temporary directory for use by this web application. This value is used to construct the value of the javax.servlet.context.tempdir context attribute. Compiled JSPs are also placed in this directory. |
singleThreadedServletPoolSize |
5 |
Specifies the maximum number of servlet instances allocated for each SingleThreadModel servlet in the web application. |
reuseSessionID |
false |
If true, this property causes the web application to reuse the JSESSIONID value (if present) in the request header as the session ID when creating sessions. The default behavior of web applications is not to reuse session IDs. Instead, applications generate cryptographically random session IDs for new sessions. |
changeSessionIdOnAuthentication |
false |
If true, allows the web application to change the session ID after authentication in order to protect against session fixation attacks as described in http://www.owasp.org/index.php/Session_Fixation. |
relativeRedirectAllowed |
false |
If true, allows the web application to send a relative URL to the client using the HttpResponse.sendRedirect() API (that is, it suppresses the container from translating a relative URL to a fully qualified URL). |
This element contains the web context root of the application or web applications. This overrides the corresponding element in the web.xml file.
none
none
Specifies a property that has a name and a value. A property adds configuration information to its parent element that is:
optional with respect to Web Server but Needed by a system or object that Web Server doesn't have knowledge of, such as an LDAP server or a Java class
For example, a manager-properties element can include property subelements:
<manager-properties> <property name="reapIntervalSeconds" value="20" /> </manager-properties>
The properties that manager-properties element uses depends on the value of the parent session-manager element persistence-type attribute. For details, see the description of the session-manager element.
The following table describes subelement for the property element.
Table A–5 property Subelement
Element |
Required |
Description |
---|---|---|
zero or one |
Contains a text description of this element. |
The following table describes attributes for the property element.
Table A–6 property Attributes
Attribute |
Default |
Description |
---|---|---|
name |
none |
Specifies the name of the property or variable |
value |
none |
Specifies the value of the property or variable |
This element contains a text description of the parent element.
none
none