Hi, I am required to create a logger which has the values of the data being send for processing as well as the data being send back so that we can diferentiate to find the changes that have been made. We are using the Strus framework so all the processing goes through a single class. I have used the request.getParameterMap() and request.getParameter(String paramatername). However once i pass it to the filter and get the response i am at a loss of how to get the values going in the response. Do i have to somehow convert the outputstream odf the response into an inputstream and then parse the HTML or something like that? I am totally at a loss. Please advice.
Joined: Aug 01, 2005
Using filters you can modify both the request and also the response. Please dig into the filter concept properly
Joined: Dec 27, 2004
HI rajesh i looked into the Filter. but i am not sure exactly what you were referring to. This is what i have done
Now i have the complete HTML page as a stringBuffer. But to get the value of the form elements i have to parse etc which i dont think is a great idea since the accuracy goes down quiet a lot. Am i missing something in the filter or is there any other way? Thanks for the help. Sandip
Joined: Feb 26, 2005
One way is to use the filter on the servlet that generates the data. This is the servlet that will pass the data that the jsp needs to complete the html.