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")
Copy to Clipboard Toggle word wrap
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 to false.
@HttpError
@HttpError(errorCode=404)
Copy to Clipboard Toggle word wrap
Specifies that the annotated exception causes a HTTP error to be sent.
  • errorCode — the HTTP error code. Defaults to 500.
  • 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 to false.
Back to top
Red Hat logoGithubredditYoutubeTwitter

Learn

Try, buy, & sell

Communities

About Red Hat Documentation

We help Red Hat users innovate and achieve their goals with our products and services with content they can trust. Explore our recent updates.

Making open source more inclusive

Red Hat is committed to replacing problematic language in our code, documentation, and web properties. For more details, see the Red Hat Blog.

About Red Hat

We deliver hardened solutions that make it easier for enterprises to work across platforms and environments, from the core datacenter to the network edge.

Theme

© 2025 Red Hat