Code example for NestedServletException

0
					throw (ServletException) ex; 
				} 
				if (ex instanceof RuntimeException) { 
					throw (RuntimeException) ex; 
				} 
				throw new NestedServletException("Unhandled exception", ex); 
			} 
		} 
	} 
 
	/** 
	 * Redirect the user according to the specified exception. 
	 *  
	 * @param resourceThatNeedsAuthorization 
	 * @param e The user redirect exception. 
	 * @param request The request. 
	 * @param response The response. 
	 */ 
	protected void redirectUser(UserRedirectRequiredException e, HttpServletRequest request, 
			HttpServletResponse response) throws IOException {