The following table lists and describes the supported JSF annotations:
Package | Included 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.
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 name | Servlet specifications | JSP specifications | Exception class | ManagedBean (JSF) | Other class | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Servlet | Servlet (API) | Servlet filter | Servlet filter (API) | Event listener | Event listener (API) | JSP FILE | Tag handler | Tag library event listener | |||||
Classic tag handler | Simple tag handler | ||||||||||||
@ManagedBean | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | -- | Y | -- |
Annotation that can be coded in an EJB-JAR file is not available.
Annotation that can be coded in Servlets or JSPs of library JAR is not available.
Annotation that can be coded in Enterprise Bean, Exception class, and other library JAR classes is not available.