Hello,
In a Java web application, is there any way to execute some code after and depending on the HttpServletResponse
that has been sent to the client? Thanks in advance.
views:
34answers:
1
+3
A:
You can:
- make a
Filter
that has code after thechain.doFilter(request, response)
method - make a filter that wraps the
HttpServletResponse
in a custom response object which handles whatever operations you like - in this case - replacing theOutputStream
with one that logs the desired information
Bozho
2010-07-30 12:52:02
Thanks for the answer!
rvelaz
2010-07-30 15:39:15
@rvelaz: If an answer helped in solving the problem, you should then mark the answer accepted.
BalusC
2010-07-30 17:27:12