7.12.5. 共通の例外
JPA を使用している場合
<exception class="javax.persistence.EntityNotFoundException">
<redirect view-id="/error.xhtml">
<message>Not found</message>
</redirect>
</exception>
<exception class="javax.persistence.OptimisticLockException">
<end-conversation/>
<redirect view-id="/error.xhtml">
<message>
Another user changed the same data, please try again
</message>
</redirect>
</exception>
Seam Application Framework を使用している場合
<exception class="org.jboss.seam.framework.EntityNotFoundException">
<redirect view-id="/error.xhtml">
<message>Not found</message>
</redirect>
</exception>
Seam Security を使用している場合
<exception class="org.jboss.seam.security.AuthorizationException">
<redirect>
<message>You don't have permission to do this</message>
</redirect>
</exception>
<exception class="org.jboss.seam.security.NotLoggedInException">
<redirect view-id="/login.xhtml">
<message>Please log in first</message>
</redirect>
</exception>
そして、 JSF の場合
<exception class="javax.Faces.application.ViewExpiredException">
<redirect view-id="/error.xhtml">
<message>Your session has timed out, please try again</message>
</redirect>
</exception>
ユーザーがすでにセッションの期限切れとなったページに戻ると
ViewExpiredException が発生します。 「長期実行の対話の必要」 で説明した conversation-required と no-conversation-view-id の設定により対話内で使用されたページにアクセスしながら、 セッションの有効期限に対して細かな制御が可能になります。