1 23 24 25 package org.apache.slide.webdav.logger; 26 27 import java.io.IOException ; 28 29 import javax.servlet.http.HttpServletResponse ; 30 import javax.servlet.http.HttpServletResponseWrapper ; 31 32 import org.apache.slide.common.Domain; 33 34 47 public class StatusHttpServletResponseWrapper extends HttpServletResponseWrapper 48 { 49 50 51 private int statusCode = -1; 52 private String statusText = ""; 53 54 65 public StatusHttpServletResponseWrapper(HttpServletResponse response) { 66 super(response); 67 Domain.debug("Create XHttpServletResponseFacade"); 68 } 69 70 71 public int getStatus() { 72 return statusCode; 73 } 74 public String getStatusText() { 75 return statusText; 76 } 77 public void setStatus(int sc) { 78 statusCode = sc; 79 super.setStatus(sc); 80 } 81 public void setStatus(int sc, String msg) { 82 statusCode = sc; 83 statusText = msg; 84 super.setStatus(sc, msg); 85 } 86 public void sendError( int sc ) throws IOException { 87 statusCode = sc; 88 super.sendError(sc); 89 } 90 public void sendError( int sc, String msg ) throws IOException { 91 statusCode = sc; 92 statusText = msg; 93 super.sendError(sc, msg); 94 } 95 } 96 | Popular Tags |