JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle GlassFish Server 3.1 Application Deployment Guide
search filter icon
search icon

Document Information

Preface

1.  Overview of Oracle GlassFish Server 3.1 Application Deployment

2.  Deploying Applications

A.  The asadmin Deployment Subcommands

B.  GlassFish Server Deployment Descriptor Files

C.  Elements of the GlassFish Server Deployment Descriptors

activation-config

Superelements

Subelements

activation-config-property

Superelements

Subelements

activation-config-property-name

Superelements

Subelements

activation-config-property-value

Superelements

Subelements

admin-object-resource

Superelements

Subelements

Attributes

Properties

as-context

Superelements

Subelements

archive-name

Superelements

Subelements

auth-method

Superelements

Subelements

auth-realm

Superelements

Subelements

Attributes

Example

backend-principal

Superelements

Subelements

Attributes

bean-cache

Superelements

Subelements

Example

bean-pool

Superelements

Subelements

Example

cache

Superelements

Subelements

Attributes

Properties

Cache Class Names

cache-helper

Superelements

Subelements

Attributes

cache-helper-ref

Superelements

Subelements

cache-idle-timeout-in-seconds

Superelements

Subelements

cache-mapping

Superelements

Subelements

call-property

Superelements

Subelements

caller-propagation

Superelements

Subelements

cert-db

Superelements

Subelements

Attributes

check-all-at-commit

Superelements

check-modified-at-commit

Superelements

Subelements

check-version-of-accessed-instances

Superelements

Subelements

checkpoint-at-end-of-method

Superelements

Subelements

checkpointed-methods

Superelements

class-loader

Superelements

Subelements

Attributes

Properties

client-container

Superelements

Subelements

Attributes

Properties

client-credential

Superelements

Subelements

Attributes

cmp

Superelements

Subelements

cmp-field-mapping

Superelements

Subelements

cmp-resource

Superelements

Subelements

cmr-field-mapping

Superelements

Subelements

cmr-field-name

Superelements

Subelements

cmt-timeout-in-seconds

Superelements

Subelements

column-name

Superelements

Subelements

column-pair

Superelements

Subelements

commit-option

Superelements

Subelements

compatibility

Superelements

Subelements

confidentiality

Superelements

Subelements

connector-connection-pool

Superelements

Subelements

Attributes

Properties

connector-resource

Superelements

Subelements

Attributes

consistency

Superelements

Subelements

constraint-field

Superelements

Subelements

Attributes

constraint-field-value

Superelements

Subelements

Attributes

context-root

Superelements

Subelements

cookie-properties

Superelements

Subelements

Properties

create-tables-at-deploy

Superelements

Subelements

custom-resource

Superelements

Subelements

Attributes

database-vendor-name

Superelements

Subelements

debugging-enabled

Superelements

Subelements

default

Superelements

Subelements

default-helper

Superelements

Subelements

Properties

default-resource-principal

Superelements

Subelements

description

Superelements

Subelements

disable-nonportable-jndi-names

Superelements

Subelements

dispatcher

Superelements

Subelements

drop-tables-at-undeploy

Superelements

Subelements

ejb

Superelements

Subelements

Attributes

Example

ejb-name

Superelements

Subelements

ejb-ref

Superelements

Subelements

ejb-ref-name

Superelements

Subelements

eligible

Superelements

Subelements

endpoint-address-uri

Superelements

Subelements

Example

enterprise-beans

Superelements

Subelements

Example

entity-mapping

Superelements

Subelements

establish-trust-in-client

Superelements

Subelements

establish-trust-in-target

Superelements

Subelements

external-jndi-resource

Superelements

Subelements

Attributes

fetched-with

Superelements

Subelements

field-name

Superelements

Subelements

finder

Superelements

Subelements

flush-at-end-of-method

Superelements

Subelements

gen-classes

Superelements

Subelements

glassfish-application

Superelements

Subelements

glassfish-application-client

Superelements

Subelements

glassfish-ejb-jar

Superelements

Subelements

glassfish-web-app

Superelements

Subelements

Attributes

Properties

group-map

Superelements

Subelements

Attributes

group-name

Superelements

Subelements

http-method

Superelements

Subelements

idempotent-url-pattern

Superelements

Subelements

Attributes

Example

integrity

Superelements

Subelements

ior-security-config

Superelements

Subelements

is-cache-overflow-allowed

Superelements

is-one-one-cmp

Superelements

is-read-only-bean

Superelements

Subelements

java-method

Superelements

Subelements

java-web-start-access

Superelements

Subelements

jdbc-connection-pool

Superelements

Subelements

Attributes

GlassFish Server Properties

Database Properties

jdbc-resource

Superelements

Subelements

Attributes

jms-durable-subscription-name

Superelements

Subelements

jms-max-messages-load

Superelements

Subelements

jndi-name

Superelements

Subelements

jnlp-doc

Superelements

Subelements

jsp-config

Superelements

Subelements

Properties

keep-state

Superelements

Subelements

key-field

Superelements

Subelements

Attributes

level

Superelements

Subelements

local-home-impl

Superelements

Subelements

local-impl

Superelements

Subelements

locale-charset-info

Superelements

Subelements

Attributes

locale-charset-map

Superelements

Subelements

Attributes

Example Agents

localpart

Superelements

Subelements

lock-when-loaded

Superelements

Subelements

lock-when-modified

Superelements

log-service

Superelements

Subelements

Attributes

login-config

Superelements

Subelements

mail-resource

Superelements

Subelements

Attributes

Properties

manager-properties

Superelements

Subelements

Properties

mapping-properties

Superelements

max-cache-size

Superelements

Subelements

max-pool-size

Superelements

Subelements

max-wait-time-in-millis

Superelements

mdb-connection-factory

Superelements

Subelements

mdb-resource-adapter

Superelements

Subelements

message

Superelements

Subelements

message-destination

Superelements

Subelements

message-destination-name

Superelements

Subelements

message-destination-ref

Superelements

Subelements

message-destination-ref-name

Superelements

Subelements

message-security

Superelements

Subelements

message-security-binding

Superelements

Subelements

Attributes

message-security-config

Superelements

Subelements

Attributes

method

Superelements

Subelements

method-intf

Superelements

Subelements

method-name

Superelements

Subelements

Examples

method-param

Superelements

Subelements

method-params

Superelements

Subelements

name

Superelements

Subelements

named-group

Superelements

Subelements

namespaceURI

Superelements

Subelements

none

Superelements

Subelements

one-one-finders

Superelements

Subelements

operation-name

Superelements

Subelements

parameter-encoding

Superelements

Subelements

Attributes

pass-by-reference

Superelements

Subelements

password

Superelements

Subelements

per-request-load-balancing

Superelements

Subelements

pm-descriptors

Superelements

pool-idle-timeout-in-seconds

Superelements

Subelements

port-component-name

Superelements

Subelements

port-info

Superelements

Subelements

prefetch-disabled

Superelements

Subelements

principal

Superelements

Subelements

principal-map

Superelements

Subelements

Attributes

principal-name

Superelements

Subelements

Attributes

property (with attributes)

Superelements

Subelements

Attributes

Example

property (with subelements)

Superelements

Subelements

Example

provider-config

Superelements

Subelements

Attributes

query-filter

Superelements

Subelements

query-method

Superelements

Subelements

query-ordering

Superelements

Subelements

query-params

Superelements

Subelements

query-variables

Superelements

Subelements

read-only

Superelements

Subelements

realm

Superelements

Subelements

refresh-field

Superelements

Subelements

Attributes

refresh-period-in-seconds

Superelements

Subelements

removal-timeout-in-seconds

Superelements

Subelements

remote-home-impl

Superelements

Subelements

remote-impl

Superelements

Subelements

request-policy

Superelements

Subelements

Attributes

request-protection

Superelements

Subelements

Attributes

required

Superelements

Subelements

res-ref-name

Superelements

Subelements

resize-quantity

Superelements

Subelements

resource-adapter-config

Superelements

Subelements

Attributes

Properties

resource-adapter-mid

Superelements

Subelements

resource-env-ref

Superelements

Subelements

Example

resource-env-ref-name

Superelements

Subelements

resource-ref

Superelements

Subelements

Example

resources

Superelements

Subelements

response-policy

Superelements

Subelements

Attributes

response-protection

Superelements

Subelements

Attributes

role-name

Superelements

Subelements

sas-context

Superelements

Subelements

schema

Superelements

Subelements

Examples

schema-generator-properties

Superelements

Subelements

Properties

Example

secondary-table

Superelements

Subelements

security

Superelements

Subelements

security-map

Superelements

Subelements

Attributes

security-role-mapping

Superelements

Subelements

service-endpoint-interface

Superelements

Subelements

service-impl-class

Superelements

Subelements

service-qname

Superelements

Subelements

service-ref

Superelements

Subelements

service-ref-name

Superelements

Subelements

servlet

Superelements

Subelements

servlet-impl-class

Superelements

Subelements

servlet-name

Superelements

Subelements

session-config

Superelements

Subelements

session-manager

Superelements

Subelements

Attributes

session-properties

Superelements

Subelements

Properties

ssl

Superelements

Subelements

Attributes

steady-pool-size

Superelements

Subelements

store-properties

Superelements

Subelements

Properties

stub-property

Superelements

Subelements

Properties

Example

sun-cmp-mapping

Superelements

Subelements

sun-cmp-mappings

Superelements

Subelements

table-name

Superelements

Subelements

target-server

Superelements

Subelements

Attributes

tie-class

Superelements

Subelements

timeout

Superelements

Subelements

Attributes

transport-config

Superelements

Subelements

transport-guarantee

Superelements

Subelements

unique-id

Superelements

Subelements

url-pattern

Superelements

Subelements

user-group

Superelements

Subelements

use-thread-pool-id

Superelements

Subelements

value

Superelements

Subelements

valve

Superelements

Subelements

Attributes

Example

vendor

Superelements

Subelements

version-identifier

Superelements

Subelements

victim-selection-policy

Superelements

Subelements

Example

web

Superelements

Subelements

web-uri

Superelements

Subelements

webservice-description

Superelements

Subelements

webservice-description-name

Superelements

Subelements

webservice-endpoint

Superelements

Subelements

work-security-map

Superelements

Subelements

Attributes

wsdl-override

Superelements

Subelements

Example

wsdl-port

Superelements

Subelements

wsdl-publish-location

Superelements

Subelements

Example

Index

glassfish-web-app

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

Superelements

none

Subelements

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

Table C-65 glassfish-web-app Subelements

Element
Required
Description
zero or one
Contains the web context root for the web module.
zero or more
Maps roles to users or groups in the currently active realm.
zero or more
Specifies a principal name for a servlet, which is used for the run-as role defined in web.xml.
zero or more
Specifies a URL pattern for idempotent requests.
zero or one
Specifies session manager, session cookie, and other session-related information.
zero or more
Maps the absolute JNDI name to the ejb-ref in the corresponding Java EE XML file.
zero or more
Maps the absolute JNDI name to the resource-ref in the corresponding Java EE XML file.
zero or more
Maps the absolute JNDI name to the resource-env-ref in the corresponding Java EE XML file.
zero or more
Specifies runtime settings for a web service reference.
zero or more
Specifies the name of a physical message destination.
zero or one
Configures caching for web application components.
zero or one
Specifies class loader configuration information.
zero or one
Specifies JSP configuration information.
zero or one
Deprecated. Use the parameter-encoding subelement of glassfish-web-app instead.
zero or one
Determines the default request character encoding and how the web container decodes parameters from forms according to a hidden field value.
zero or more
Specifies a property, which has a name and a value.
zero or more
Specifies a custom valve.
zero or more
Specifies the name of a logical message destination.
zero or more
Specifies a name and optional publish location for a web service.
zero or one
Retains web sessions across redeployments.
zero or one
Contains version information for a web application.

Attributes

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

Table C-66 glassfish-web-app Attributes

Attribute
Default
Description
error-url
(blank)
(optional) Not implemented. Do not use.
httpservlet-security-provider
none
(optional) Specifies the HttpServlet message layer provider that the web container's servlet auth-constraint processing calls.

Properties

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

Table C-67 glassfish-web-app Properties

Property
Default
Description
allowLinking
false
If true, resources in this web application that are symbolic links are served. You can also define this property for a virtual server. Web applications on the virtual server that do not define this property use the virtual server's value. For details, see create-virtual-server(1).

Caution

Caution - Setting this property to true on Windows systems exposes JSP source code.


alternatedocroot_n
none
Specifies an alternate document root (docroot), where n is a positive integer that allows specification of more than one. Alternate docroots allow web applications to serve requests for certain resources from outside their own docroot, based on whether those requests match one (or more) of the URI patterns of the web application's alternate docroots.

If a request matches an alternate docroot's URI pattern, it is mapped to the alternate docroot by appending the request URI (minus the web application's context root) to the alternate docroot's physical location (directory). If a request matches multiple URI patterns, the alternate docroot is determined according to the following precedence order:

  • Exact match

  • Longest path match

  • Extension match

For example, the following properties specify three alternate docroots. The URI pattern of the first alternate docroot uses an exact match, whereas the URI patterns of the second and third alternate docroots use extension and longest path prefix matches, respectively.

<property name="alternatedocroot_1" 
   value="from=/my.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_2" 
   value="from=*.jpg dir=/srv/images/jpg"/>
<property name="alternatedocroot_3" 
   value="from=/jpg/* dir=/src/images"/>

The value of each alternate docroot has two components: The first component, from, specifies the alternate docroot's URI pattern, and the second component, dir, specifies the alternate docroot's physical location (directory). Spaces are allowed in the dir component.

You can set this property for all the web applications on a specific virtual server. For details, see create-virtual-server(1).

valve_n
none
This property is deprecated. Use the valve subelement instead.

Specifies a fully qualified class name of a custom valve, where n is a positive integer that allows specification of more than one. The valve class must implement the org.apache.catalina.Valve interface from Tomcat or previous GlassFish Server releases, or the org.glassfish.web.valve.GlassFishValve interface from the current GlassFish Server release. For example:

<property name="valve_1" 
   value="org.glassfish.extension.Valve"/>

You can set this property for all the web applications on a specific virtual server. For details, see create-virtual-server(1).

listener_n
none
Specifies a fully qualified class name of a custom Catalina listener, where n is a positive integer that allows specification of more than one. The listener class must implement the org.apache.catalina.ContainerListener, org.apache.catalina.LifecycleListener, or org.apache.catalina.InstanceListener interface. For example:
<property name="listener_1" 
   value="org.glassfish.extension.MyLifecycleListener"/>

You can set this property for all the web applications on a specific virtual server. For details, see create-virtual-server(1).

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.
securePagesWithPragma
true
Set this property to false to ensure that for this web application file downloads using SSL work properly in Internet Explorer.

You can set this property for all the web applications on a specific virtual server. For details, see create-virtual-server(1).

singleThreadedServletPoolSize
5
Specifies the maximum number of servlet instances allocated for each SingleThreadModel servlet in the web application.
tempdir
domain-dir/generated/app-name

or

domain-dir/generated/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).