externalContext.responseSendError(HttpServletResponse.SC_NOT_FOUND, ((HttpServletRequest) externalContext.getRequest()).getRequestURI()); externalContext.responseSendError(HttpServletResponse.SC_NOT_FOUND, null);
@Override public void responseSendError(int statusCode, String message) throws IOException { delegate.responseSendError(statusCode, message); }
@Override public void responseSendError(int statusCode, String message) throws IOException { wrapped.responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
@Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
private String sendError(int errorCode) { FacesContext context = FacesContext.getCurrentInstance(); try { context.getExternalContext().responseSendError(errorCode,null); } catch (IOException ex) { Logger.getLogger(PermissionsWrapper.class.getName()).log(Level.SEVERE, null, ex); } context.responseComplete(); return ""; }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * <p>The default behavior of this method is to * call {@link ExternalContext#responseSendError(int,String)} * on the wrapped {@link ExternalContext} object.</p> * * @see javax.faces.context.ExternalContext#responseSendError(int,String) */ @Override public void responseSendError(int statusCode, String message) throws IOException { getWrapped().responseSendError(statusCode, message); }
/** * Handles the case where a Facelet cannot be found. * * @param context the {@link FacesContext} for the current request * @param viewId the view ID that was to be mapped to a Facelet * @param message optional message to include in the 404 * @throws IOException if an error occurs sending the 404 to the client */ protected void handleFaceletNotFound(FacesContext context, String viewId, String message) throws IOException { context.getExternalContext().responseSendError( SC_NOT_FOUND, message != null ? viewId + ": " + message : viewId ); context.responseComplete(); }
protected void handleFaceletNotFound(FacesContext context, String viewId) throws FacesException, IOException { String actualId = context.getApplication().getViewHandler().getActionURL(context, viewId); context.getExternalContext().responseSendError(HttpServletResponse.SC_NOT_FOUND, actualId); context.responseComplete(); }
/** * <p> * Send {@link HttpServletResponse#SC_NOT_FOUND} (404) to the client. * </p> * * @param context the {@link FacesContext} for the current request */ protected void send404Error(FacesContext context) { try { context.responseComplete(); context.getExternalContext().responseSendError(HttpServletResponse.SC_NOT_FOUND, ""); } catch (IOException ioe) { throw new FacesException(ioe); } }
/** * <p> * Send {@link HttpServletResponse#SC_NOT_FOUND} (404) to the client. * </p> * * @param context the {@link FacesContext} for the current request */ protected void send404Error(FacesContext context) { try { context.responseComplete(); context.getExternalContext().responseSendError(HttpServletResponse.SC_NOT_FOUND, ""); } catch (IOException ioe) { throw new FacesException(ioe); } }
protected void handleFaceletNotFound(FacesContext context, String viewId) throws FacesException, IOException { String actualId = context.getApplication().getViewHandler().getActionURL(context, viewId); context.getExternalContext().responseSendError(HttpServletResponse.SC_NOT_FOUND, actualId); context.responseComplete(); }
protected void handleFaceletNotFound(FacesContext context, String viewId) throws FacesException, IOException { String actualId = context.getApplication().getViewHandler().getActionURL(context, viewId); context.getExternalContext().responseSendError(HttpServletResponse.SC_NOT_FOUND, actualId); context.responseComplete(); }