@web Tag Reference

These tags are used to specify information about web application components (servlets, filters & listeners). They are used in generating the WEB-INF/web.xml file.

Applies to: Servlet, Filter, Listener, JSP and JAXRPC Tags

@web Method Level Tags

@web.interface-method

@web Field Level Tags

@web Class Level Tag Usage

@web.ejb-local-ref (0..1)

Defines a local EJB reference with the specified name, type, home interface name, local interface name, link name, and description. The value of the link parameter must be the ejb-name of an enterprise bean in the same J2EE application unit.

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the ejb referencefalse
typetextThe expected type of the referenced enterprise bean. Must be one of the following: Entity or Session
Valid options are:

Entity

Session
false
hometextThe home interface of the referenced ejbfalse
localtextThe local interface of the referenced ejbfalse
linktextThe link to the EJBfalse
descriptiontextAn optional description for the ejb-reffalse

@web.ejb-ref (0..1)

Defines a remote EJB reference with the specified name, type, home interface name, remote interface name, link name, and description. The value of the link parameter must be the ejb-name of an enterprise bean in the same J2EE application unit

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the ejb referencefalse
typetextThe expected type of the referenced enterprise bean. Must be one of the following: Entity or Session
Valid options are:

Entity

Session
false
hometextThe home interface of the referenced ejbfalse
remotetextThe remote interface of the referenced ejbfalse
linktextThe link to the EJBfalse
descriptiontextAn optional description for the ejb-reffalse

@web.env-entry (0..1)

Defines a environment entry with the specified description, name, type and value

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
descriptiontextA description of the env-entryfalse
nametextThe name of the env-entrytrue
typetextThe type of the env-entrytrue
valuetextThe value of the env-entryfalse

@web.filter (0..1)

Declares the class as a Filter class, with the specified name, display-name, icon and description. Applicable to Servlet 2.3 only

Applies to: Filter

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name for the filter. Unique within the applicationtrue
display-nametextThe display name of the filterfalse
icontextThe icon for the filterfalse
descriptiontextA description for the filterfalse

@web.filter-init-param (0..1)

Declares init parameters for the Filter with the specified parameter name, value and description. Applicable to Servlet 2.3 only.

Applies to: Filter

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the init parametertrue
valuetextThe value for the parameterfalse
descriptiontextAn optional description of the parameterfalse

@web.filter-mapping (0..1)

Defines the mapping for the Filter. Either url-pattern or servlet-name should be specified. Applicable to Servlet 2.3 only. With Servlet 2.4 it is also possible to specify a comma-separated list of dispatchers.

Applies to: Filter

ParameterTypeApplicabilityDescriptionMandatory
url-patterntextThe url pattern the filter should matchfalse
servlet-nametextThe servlet name for the filterfalse
dispatchertextThe request dispatchers which should consider the filterfalse

@web.listener (0..1)

Declares the class as a Listener class

Applies to: Listener

@web.resource-env-ref (0..1)

Defines a resource environment reference with the specified name, type and description

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the resource environment referencetrue
typetextThe type of the referenced resourcetrue
descriptiontextAn optional description of the resource referencefalse

@web.resource-ref (0..1)

Defines a resource reference with the specified name, type, description, authentication (auth) and scope

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the resource referencetrue
typetextThe type of the referenced resourcetrue
authtextThe authentication for the resource. "Application" | "Container"
Valid options are:

Application

Container
true
descriptiontextAn optional description for the resource referencefalse
scopetextThe scope of the resource. "Shareable" | "Unshareable"
Valid options are:

Shareable

Unshareable
false
jndi-nametext The physical jndi-name of the resource. Note: it currently is used only in 1-2 of the app server modules, but those modules will also support this consolidated standard tag soon. false

@web.security-role (0..1)

Defines a security role with the specified role-name and description

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
role-nametextThe role namefalse
descriptiontextThe description of the rolefalse

@web.security-role-ref (0..1)

Defines a security role reference with the name role-name to a security role link named role-link

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
role-nametextThe name of the role referencetrue
role-linktextThe name of the role linktrue

@web.servlet (0..1)

Declares the class as a Servlet class, with the specified name, display-name, icon and description. As of Servlet 2.4, the servlet class may also an arbitrary jaxrpc bean that is to be exposed as a web service endpoint.

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the servlet - unique within the applicationtrue
display-nametextThe display name of the servletfalse
icontextThe icon for the servletfalse
descriptiontextA description for the servletfalse
service-endpoint-classtextJAXRPC beansfully qualified name of the service endpoint interfacefalse
service-endpoint-extendstext Declare which interface the generated service-endpoint interface should extend. Default is "java.rmi.Remote".

Default value(s):

java.rmi.Remote
false
service-endpoint-packagetextJAXRPC Beans The package the service-endpoint interface should be in - only used where service-endpoint-class is not present. Use <packageSubstitution/> to configure which package the interface should end up in. false
service-endpoint-patterntextSession beans, EJB 2.1 The pattern to be used in determining the unqualified name of the service-endpoint interface - only used if service-endpoint-class is not present. false
service-endpoint-business-interfacetextJAXRPC beans Defines the service-endpoint business interface for the bean. Similar to remote-business-interface. false
load-on-startuptextInteger indicating order in which the servlet should be loaded.false
run-astextSpecifies the run-as identity (the name of a security role) to be used for the execution of the web application.false

@web.servlet-init-param (0..1)

Declares init parameters for the Servlet with the specified parameter name, value and description

Applies to: Servlet

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the init parametertrue
valuetextThe value for the parameterfalse
descriptiontextAn optional description of the parameterfalse

@web.servlet-mapping (0..1)

Defines the mapping for the Servlet to the specified url-pattern

Applies to: Filter

ParameterTypeApplicabilityDescriptionMandatory
url-patterntextThe url pattern the filter should matchfalse

@web Method Level Tag Usage

@web.interface-method (0..1)

Exposes the bean method in the service interface.

Applies to: JAXRPC Beans, Servlet 2.4

@web Field Level Tag Usage

@jsp Tag Reference

These tags are used to give information about JSP custom tags and tag library validators, used in generating the tag library descriptor (TLD) file.

Applies to: JSP Tag or Tag Library Validator

@jsp Method Level Tags

@jsp.attribute

@jsp Field Level Tags

@jsp Class Level Tag Usage

@jsp.tag (0..1)

Declares the class as a class implementing a JSP tag and specifies various properties of that tag

Applies to: Tag

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the JSP tagtrue
tei-classtextThe tei class for the JSPfalse
body-contenttextThe body content field for the tag.
Valid options are:

tagdependent

JSP

empty

Default value(s):

JSP
false
display-nametextAn optional display name for the tagfalse
small-icontextAn optional small icon for the tagfalse
large-icontextAn optional large icon for the tagfalse
descriptiontextAn optional description for the tagfalse

@jsp.validator-init-param (0..1)

Declares init parameters for the Validator with the specified parameter name, value and description

Applies to: Tag Library Validator

ParameterTypeApplicabilityDescriptionMandatory
nametextThe name of the validator init paramtrue
valuetextThe value of the validator init paramtrue
descriptiontextAn optional description for the validatorfalse

@jsp.variable (0..1)

Declares a JSP tag variable and information on the scripting variables defined.

Applies to: Tag

ParameterTypeApplicabilityDescriptionMandatory
name-giventextThe variable name as a constantfalse
name-from-attributetextThe name of an attribute whose (translation time) value will give the name of the variable. One of name-given or name-from-attribute is requiredfalse
classtextName of the class of the variable. java.lang.String is default

Default value(s):

java.lang.String
false
declareboolWhether the variable is declared or not.

Default value(s):

true
false
scopetextThe scope of the scripting variable defined.
Valid options are:

NESTED

AT_BEGIN

AT_END

Default value(s):

NESTED
false
descriptiontextAn optional description of the variablefalse

@jsp Method Level Tag Usage

@jsp.attribute (0..1)

Declares the specified field a JSP tag attribute. This tag should be placed on getter methods

Applies to: Tag

ParameterTypeApplicabilityDescriptionMandatory
requiredboolWhether the attribute is requiredtrue
rtexprvalueboolWhether the attribute is a runtime attributetrue
typetextThe type of the attributetrue
descriptiontextAn optional description of the attributefalse

@jsp Field Level Tag Usage