so far I understand it does not matter where I put the method.
But can you give me an example where a filter can be used as request and response filter?
For me the question in the book suggest that I can write a filter and it can be used as request and
I made as an example a filter which outputs the http request and the response header (I know it is not
such a good example, because you have to differ between Request and Response Object, but I can only
imagine examples where I get always two different filter classes) . To output
both headers, I need two classes one for the request and one for the response header.
The request filter:
and the response filter:
Is it possible for this example (or a similar example) to have only one filter? If not I would answer for the question "A filter can act on only the request or response object, not both." yes and this would be wrong
Thanks in advance