Hi All, I am trying to create a servlet filter to monitor the requests on my web application.
I would like to record the URI and query string and I have accomplished this without any problems. But when I added code to log the posted data this results in some problems. I read the posted data from the input stream of the request and copy these contents to file. So far so good. But when my web application code is executing it is missing all the data from the post in the parameter map returned by the getParameterMap() function on the request, I suspect because I have read all the data from the input stream of the request. I tried to solve it by calling the doFilter on the chain with a wrapper request with a custom getInputStream method where I return my own servlet inputstream containing the data I had read from the original inputstream, but the getInpustream is never called on my wrapper. Can anyone provide me with some insight how to accomplish such a logging and what I am doing wrong in the structure above ? Kind regards, Marco Laponder