A Filter intercepts requests and responses at run time to make some actions on information
contained in the requests or responses. Filters typically do not themselves create responses. Before
executing any business logic based on the request sent by user, we can do tasks on the user request like
authentication or appending attributes to the requests etc. As well as, we can handle the responses sent
from the servlet or bean (business logic), before they reach client. All these can be achieved in Java by
implementing the interface javax.servlet.Filter.
contained in the requests or responses. Filters typically do not themselves create responses. Before
executing any business logic based on the request sent by user, we can do tasks on the user request like
authentication or appending attributes to the requests etc. As well as, we can handle the responses sent
from the servlet or bean (business logic), before they reach client. All these can be achieved in Java by
implementing the interface javax.servlet.Filter.
Visit articles page of the website learningmela.com to download the document and for more details.