2.1.12 List of supported JSF annotations

The following table lists and describes the supported JSF annotations:

PackageIncluded annotations
javax.faces.application@ResourceDependencies
@ResourceDependency
javax.faces.bean@ApplicationScoped
@CustomScoped
@ManagedProperty
@NoneScoped
@ReferencedBean
@RequestScoped
@SessionScoped
@ViewScoped
javax.faces.component@FacesComponent
javax.faces.component.behavior@FacesBehavior
javax.faces.convert@FacesConverter
javax.faces.event@ListenerFor
@ListenersFor
@NamedEvent
javax.faces.render@FacesBehaviorRenderer
@FacesRenderer
javax.faces.validator@FacesValidator

The following sections describe the annotations (@ManagedBean annotations) that can be coded in each component. Note that the annotations other than @ManagedBean depend on JSF. For annotations that depend on JSF, see the JSF specification documents.

Organization of this subsection
(1) WAR file (Servlet 3.0 compliant)
(2) EJB-JAR file (EJB3.1 compliant)
(3) Library JAR (Servlet/JSP)
(4) Library JAR (Enterprise Bean/ Exception class/ Other classes)

(1) WAR file (Servlet 3.0 compliant)

The following table lists the annotations that you can code in a WAR file:

Table 2-27 Annotations (javax.faces.bean package) that can be coded in a WAR file (Servlet 3.0 compliant)

Annotation nameServlet specificationsJSP specificationsException classManagedBean (JSF)Other class
ServletServlet (API)Servlet filterServlet filter (API)Event listenerEvent listener (API)JSP FILETag handlerTag library event listener
Classic tag handlerSimple tag handler
@ManagedBean----------------------Y--
Legend:
Y: Supported.
--: Not supported by standard specifications.

(2) EJB-JAR file (EJB3.1 compliant)

Annotation that can be coded in an EJB-JAR file is not available.

(3) Library JAR (Servlet/JSP)

Annotation that can be coded in Servlets or JSPs of library JAR is not available.

(4) Library JAR (Enterprise Bean/ Exception class/ Other classes)

Annotation that can be coded in Enterprise Bean, Exception class, and other library JAR classes is not available.