/** * Return the HTTP status code associated with this Response. */ public int getStatus() { return response.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { checkResponse(); return response.getStatus(); }
/** * Return the HTTP status code associated with this Response. */ public int getStatus() { checkResponse(); return response.getStatus(); }
public void afterService(Request req, Response res) throws Exception { if (res.getStatus() == 404 && !commitErrorResponse){ return; } try{ req.action( ActionCode.ACTION_POST_REQUEST , null); }catch (Throwable t) { logger.log(Level.WARNING,"afterService()",t); } res.finish(); req.recycle(); res.recycle(); }
/** * Finish the {@link Response} and recycle the {@link Request} and the * {@link Response}. If the {@link StaticResourcesAdapter#commitErrorResponse} * is set to false, this method does nothing. * * @param req {@link Request} * @param res {@link Response} * @throws java.lang.Exception */ public void afterService(Request req, Response res) throws Exception { if (res.getStatus() == 404 && !commitErrorResponse){ return; } try{ req.action( ActionCode.ACTION_POST_REQUEST , null); }catch (Throwable t) { logger.log(Level.WARNING,"afterService unexpected exception: ",t); } res.finish(); req.recycle(); res.recycle(); }
/** * Finish the {@link Response} and recycle the {@link Request} and the * {@link Response}. If the {@link StaticResourcesAdapter#commitErrorResponse} * is set to false, this method does nothing. * * @param req {@link Request} * @param res {@link Response} * @throws Exception */ public void afterService(Request req, Response res) throws Exception { if (req.getNote(14) != null) { req.setNote(14, null); return; } if (res.getStatus() == 404 && !commitErrorResponse) { return; } try { req.action(ActionCode.ACTION_POST_REQUEST, null); } catch (Throwable t) { logger.log(Level.WARNING, "afterService unexpected exception: ", t); } res.finish(); }
statusDropsConnection(response.getStatus());
/** * Invoke the {@link Adapter}, which usualy invoke the Servlet * Container. */ public void invokeAdapter(){ // Process the request in the adapter if (!error) { try { adapter.service(request, response); // Handle when the response was committed before a serious // error occurred. Throwing a ServletException should both // set the status to 500 and set the errorException. // If we fail here, then the response is likely already // committed, so we can't try and set headers. if(keepAlive && !error) { // Avoid checking twice. error = response.getErrorException() != null || statusDropsConnection(response.getStatus()); } } catch (InterruptedIOException e) { error = true; } catch (Throwable t) { logger.log(Level.SEVERE, sm.getString("processorTask.serviceError"), t); // 500 - Internal Server Error response.setStatus(500); error = true; } } }
int status = response.getStatus(); switch (status) { case 200:
int status = response.getStatus(); switch (status) { case 200:
int status = response.getStatus(); switch (status) { case 200:
int responseStatus = req.getResponse().getStatus();
int responseStatus = req.getResponse().getStatus();
int responseStatus = req.getResponse().getStatus();
if (isHandleStaticResources()) { super.service(req, res); if (res.getStatus() == 404){ res.setStatus(200); res.setMessage("OK");
if (isHandleStaticResources()) { super.service(req, res); if (res.getStatus() == 404){ res.setStatus(200); res.setMessage("OK");
if (isHandleStaticResources()) { super.service(req, res); if (res.getStatus() == 404){ res.setStatus(200); res.setMessage("OK");
int statusCode = response.getStatus(); if (statusCode == 204 || statusCode == 205 || statusCode == 304) {
int statusCode = response.getStatus(); if ((statusCode == 204) || (statusCode == 205) || (statusCode == 304)) {