29.6. Annotations for exceptions
These annotations let you specify how Seam handles any exceptions propagating from a Seam component.
-
@Redirect
@Redirect(viewId="error.jsp")
Specifies that the annotated exception causes a browser redirect to a specified view ID.viewId
— specifies the JSF view ID to redirect to. You can use EL here.message
— a message to be displayed. Defaults to the exception message.end
— specifies that the long-running conversation should end. Defaults tofalse
.
-
@HttpError
@HttpError(errorCode=404)
Specifies that the annotated exception causes a HTTP error to be sent.errorCode
— the HTTP error code. Defaults to500
.message
— a message to be sent with the HTTP error. Defaults to the exception message.end
— specifies that the long-running conversation should end. Defaults tofalse
.