JSF 1.2 Exception Handling

后端 未结 1 915
一个人的身影
一个人的身影 2020-12-12 07:40

I am working on exception handling in our Application. I used try catch blocks to catch the exceptions occured in my code and i also could handle the time out exceptions by

1条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-12 08:16

     java.lang.RuntimeException: FacesContext not found 
    

    That will happen when you're requesting a JSP page containing JSF components through an URL which doesn't match the URL pattern of the FacesServlet (who is the one responsible for creating the FacesContext).

    You need to change the error page location to match the URL pattern of the FacesServlet as definited in web.xml. Based on your duplicate questions on the subject, this is among others *.faces, so setting the error page location as follows should do, exactly as I suggested in a comment on your first question on the subject.

    /sc00/ErrorPage.faces
    

    0 讨论(0)
提交回复
热议问题