actually i do have a question in reference to this. And i figured instead of opening a new
thread, i'll ask here as the OP's question seems related to what i want to.
What i want to do is to insert a hidden form field in all my pages dynamically by "scanning" the response object and then if the response content has <form> tags in it, then for each form insert the hidden field. I could do this manually, but way too many
jsp's and a dynamic solution would be much more elegant.
I have created wrapper class for the response object and another wrapper for ServletOutputStream. The problem i have are two:
a) i can't seem to get the content read out from the response, without preventing the response jsp to display in the browser, as the front end browser only displays blank screen.
b) is this possible? meaning injecting code into the stream as it is going to the end user? I looked at the compressione example in the Head First
Servlets and JSP, but i have not been able to find it helpful in my case as i'm trying to add data to the response.
Thanks for any and all feedback.