I\'m trying to report on every HTTP status code returned from my webapp. However the status code does not appear to be accessible via the ServletResponse, or even if I cast
In addition to David's answer, you'll also want to override the reset method:
@Override
public void reset() {
super.reset();
this.httpStatus = SC_OK;
}
... as well as the deprecated setStatus(int, String)
@Override
public void setStatus(int status, String string) {
super.setStatus(status, string);
this.httpStatus = status;
}