Our application serves request for mobile device (cellular phone). We
need to find a way to keep track of how many byte were read from the
request and sent in the response. We need to whole size of the
request/response not just the "Content-Length" (GET /TestValve/apps
HTTP/1.1 ... headers, everything). I was planning to go for a Valve but
it doesn't work:
--------------------------------
public void invoke(Request request, Response response) throws
IOException, ServletException {
getNext().invoke(request, response);
String localAddr = request.getLocalAddr();
int bytesRead = request.getCoyoteRequest().getBytesRead();
long bytesSent = response.getCoyoteResponse().getBytesWritten();
System.out.println("request from: " + localAddr + ", recv=" +
bytesRead + ", sent=" + bytesSent);
}
--------------------------------
bytesRead and bytesSent are always 0.
What's wrong? How can I do it?
We're are currently using Tomcat 5.5.25.
Pascal
---------------------------------------------------------------------
To start a new topic, e-mail: [email protected]
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]