I want to know how to configure a filter so that it will process only the incoming request but not the response going from the server.
Any suggestion or corresponding links would be helpful
I read in Filter docs that we can have "A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both"
Why to worry about things in which we dont have control, Why to worry about things in which we have control ! !
If you don't want to process the response, just don't write any code. You have to call "filter.doFilter()" and then after that don't do anything. Write zero lines of code. Return immediately. "Don't do anything" isn't really very complicated, but here's an example if you still need one:
Thanks for the reply...
suppose if i want to do the filter even when response is sent then what should i do ?
I am asking this because my filters are not called when response is sent (Even though i currently don't need this feature in my app i would like to know.)