geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marco Laponder" <>
Subject logging servlet filter
Date Mon, 15 Sep 2008 06:08:33 GMT
 Thanks for you reply, it strikes me as a bit odd I need to parse the
postdata myself, I was expecting the next servlet in the chain would
read the postdata by the getInputStream() (of my wrapper) and parse it
into a parameter map but this is not happening. I'll try it the way you


Van: Ivan [] 
Verzonden: vrijdag 12 september 2008 11:59
Onderwerp: Re: logging servlet filter


I guess the method getInputStream is used for the developers who want to
handle the request block themselves. Maybe the server could call some
low-level methods in the implementation of the HttpServletRequest for
request parsing.
I suggest you could use the network monitor tool to log the request
If you really want to do it in the server itself, maybe a third pary
request parser is needed,such as commons-fileupload.
I suppose the steps below could fulfill your requirements:
1. First using your current wrapper request to log the data
2. Pass your wrapper request to the commons-fileupload. maybe use new
ServletFileUpload() .parse(yourwrapperRequest)
3. For the method parse above returns a list object, you need to write
another wrapper request, and overwrite some method in it (such as
getParameter) to make your application works as usual

View raw message