Sun Java System Application Server Enterprise Edition 8.2 Developer's Guide

sun-web-app

Defines Application Server specific configuration for a web module. This is the root element; there can only be one sun-web-app element in a sun-web.xml file. See The sun-web.xml File.

Superelements

none

Subelements

The following table describes subelements for the sun-web-app element.

Table A–119 sun-web-app Subelements

Element  

Required  

Description  

context-root

zero or one 

Contains the web context root for the web application. 

security-role-mapping

zero or more 

Maps roles to users or groups in the currently active realm. 

servlet

zero or more 

Specifies a principal name for a servlet, which is used for the run-as role defined in web.xml.

idempotent-url-pattern

zero or more 

Specifies a URL pattern for idempotent requests. 

session-config

zero or one 

Specifies session manager, session cookie, and other session-related information. 

ejb-ref

zero or more 

Maps the absolute JNDI name to the ejb-ref in the corresponding J2EE XML file.

resource-ref

zero or more 

Maps the absolute JNDI name to the resource-ref in the corresponding J2EE XML file.

resource-env-ref

zero or more 

Maps the absolute JNDI name to the resource-env-ref in the corresponding J2EE XML file.

service-ref

zero or more 

Specifies runtime settings for a web service reference. 

cache

zero or one 

Configures caching for web application components. 

class-loader

zero or one 

Specifies class loader configuration information. 

jsp-config

zero or one 

Specifies JSP configuration information. 

locale-charset-info

zero or one 

Deprecated. Use the parameter-encoding subelement of sun-web-app instead.

property (with attributes)

zero or more 

Specifies a property, which has a name and a value. 

parameter-encoding

zero or one 

Determines the default request character encoding and how the web container decodes parameters from forms according to a hidden field value. 

message-destination

zero or more 

Specifies the name of a logical message destination. 

webservice-description

zero or more 

Specifies a name and optional publish location for a web service. 

Attributes

The following table describes attributes for the sun-web-app element.

Table A–120 sun-web-app Attributes

Attribute  

Default  

Description  

error-url

(blank) 

(optional) Specifies a redirect URL in case of an error. 

Properties

The following table describes properties for the sun-web-app element.

Table A–121 sun-web-app Properties

Property  

Default  

Description  

allowLinking

true

If true, resources in this web application that are symbolic links are served.

crossContextAllowed

true

If true, allows this web application to access the contexts of other web applications using the ServletContext.getContext()method.

relativeRedirectAllowed

false

If true, allows this web application to send a relative URL to the client using HttpServletResponse.sendRedirect(), and instructs the web container not to translate any relative URLs to fully qualified ones.

reuseSessionID

false

If true, sessions generated for this web application use the session ID specified in the request.

singleThreadedServletPoolSize

5

Specifies the maximum number of servlet instances allocated for each SingleThreadModel servlet in the web application.

tempdir

domain-dir/generated/j2ee-apps/app-name

or 

domain-dir/generated/j2ee-modules/module-name

Specifies a temporary directory for use by this web module. This value is used to construct the value of the javax.servlet.context.tempdir context attribute. Compiled JSP files are also placed in this directory.

useResponseCTForHeaders

false

If true, response headers are encoded using the response’s charset instead of the default (UTF-8).