configure web.xml to handle ViewExpriedException

<!-- define our error pages -->  
	<error-page>  
	    <error-code>403</error-code>  
	    <location>/noAccess.jsf</location>  
	</error-page>
	
	<error-page>  
	    <error-code>404</error-code>  
	    <location>/error.jsf</location>  
	</error-page>
	
	<error-page>  
	    <error-code>500</error-code>  
	    <location>/error.jsf</location>  
	</error-page>
	
	<!-- handle view expired exception, redirect to login, otherwise http 500 error -->
	<error-page>
	    <exception-type>javax.faces.application.ViewExpiredException</exception-type>
	    <location>/login.jsf</location>
	</error-page> 

你可能感兴趣的:(exception)