@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

@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

Parameter Type Applicability Description Mandatory
name text The name or the ejb reference

Default value(s):

false
type text The expected type of the referenced enterprise bean. Must be one of the following: Entity or Session
Valid options are:

Entity

Session
false
home text The home interface of the referenced ejb

Default value(s):

false
local text The local interface of the referenced ejb

Default value(s):

false
link text The link to the EJB

Default value(s):

false
description text An optional description for the ejb-ref

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
name text The name or the ejb reference

Default value(s):

false
type text The expected type of the referenced enterprise bean. Must be one of the following: Entity or Session
Valid options are:

Entity

Session
false
home text The home interface of the referenced ejb

Default value(s):

false
remote text The remote interface of the referenced ejb

Default value(s):

false
link text The link to the EJB

Default value(s):

false
description text An optional description for the ejb-ref

Default value(s):

false

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

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

Applies to: Servlet

Parameter Type Applicability Description Mandatory
description text A description of the env-entry

Default value(s):

false
name text The name of the env-entry

Default value(s):

true
type text The type of the env-entry

Default value(s):

true
value text The value of the env-entry

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
name text The name for the filter. Unique within the application

Default value(s):

true
display-name text The display name of the filter

Default value(s):

false
icon text The icon for the filter

Default value(s):

false
description text A description for the filter

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
name text The name of the init parameter

Default value(s):

true
value text The value for the parameter

Default value(s):

false
description text An optional description of the parameter

Default value(s):

false

@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

Applies to: Filter

Parameter Type Applicability Description Mandatory
url-pattern text The url pattern the filter should match

Default value(s):

false
servlet-name text The servlet name for the filter

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
name text The name of the resource environment reference

Default value(s):

true
type text The type of the referenced resource

Default value(s):

true
description text An optional description of the resource reference

Default value(s):

false

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

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

Applies to: Servlet

Parameter Type Applicability Description Mandatory
name text The name of the resource reference

Default value(s):

true
type text The type of the referenced resource

Default value(s):

true
auth text The authentication for the resource. "Application" | "Container"
Valid options are:

Application

Container
true
description text An optional description for the resource reference

Default value(s):

false
scope text The scope of the resource. "Shareable" | "Unshareable"
Valid options are:

Shareable

Unshareable
false
jndi-name text 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

Parameter Type Applicability Description Mandatory
role-name text The role name

Default value(s):

false
description text The description of the role

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
role-name text The name of the role reference

Default value(s):

true
role-link text The name of the role link

Default value(s):

true

@web.servlet (0..1)

Declares the class as a Servlet class, with the specified name, display-name, icon and description

Applies to: Servlet

Parameter Type Applicability Description Mandatory
name text The name of the servlet - unique within the application

Default value(s):

true
display-name text The display name of the servlet

Default value(s):

false
icon text The icon for the servlet

Default value(s):

false
description text A description for the servlet

Default value(s):

false
load-on-startup text Integer indicating order in which the servlet should be loaded.

Default value(s):

false
run-as text Specifies the run-as identity (the name of a security role) to be used for the execution of the web application.

Default value(s):

false

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

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

Applies to: Servlet

Parameter Type Applicability Description Mandatory
name text The name of the init parameter

Default value(s):

true
value text The value for the parameter

Default value(s):

false
description text An optional description of the parameter

Default value(s):

false

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

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

Applies to: Filter

Parameter Type Applicability Description Mandatory
url-pattern text The url pattern the filter should match

Default value(s):

false

@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 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

Parameter Type Applicability Description Mandatory
name text The name of the JSP tag

Default value(s):

true
tei-class text The tei class for the JSP

Default value(s):

false
body-content text The body content field for the tag.

Default value(s):


Valid options are:

tagdependent

JSP

empty

Default value(s):

JSP
false
display-name text An optional display name for the tag

Default value(s):

false
small-icon text An optional small icon for the tag

Default value(s):

false
large-icon text An optional large icon for the tag

Default value(s):

false
description text An optional description for the tag

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
name text The name of the validator init param

Default value(s):

true
value text The value of the validator init param

Default value(s):

true
description text An optional description for the validator

Default value(s):

false

@jsp.variable (0..1)

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

Applies to: Tag

Parameter Type Applicability Description Mandatory
name-given text The variable name as a constant

Default value(s):

false
name-from-attribute text The name of an attribute whose (translation time) value will give the name of the variable. One of name-given or name-from-attribute is required

Default value(s):

false
class text Name of the class of the variable. java.lang.String is default

Default value(s):

java.lang.String
false
declare bool Whether the variable is declared or not.

Default value(s):

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

NESTED

AT_BEGIN

AT_END

Default value(s):

NESTED
false
description text An optional description of the variable

Default value(s):

false

@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

Parameter Type Applicability Description Mandatory
required bool Whether the attribute is required

Default value(s):

true
rtexprvalue bool Whether the attribute is a runtime attribute

Default value(s):

true
type text The type of the attribute

Default value(s):

true
description text An optional description of the attribute

Default value(s):

false