File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes filter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "filter" Watch "filter" New topic


sihani rani
Ranch Hand

Joined: Jun 22, 2010
Posts: 32
what is filter..
what are the use of filter..

how we use filter in eclipse
Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

what is filter..
what are the use of filter..

Did you SearchFirst ? What don't you understand about filters ?

how we use filter in eclipse

Filters are common Java classes. You make them like any other classes and register them in your deployment descriptor. Nothing to do particularly with Eclipse.

[My Blog]
All roads lead to JavaRanch
vijin das
Ranch Hand

Joined: Jun 07, 2010
Posts: 129

according to The Java Servlet specification version 2.3 "A filter dynamically intercepts requests and responses to transform or use the information contained in the requests or responses. Filters typically do not themselves create responses, but instead provide universal functions that can be "attached" to any type of servlet or JSP page. .."

You can find more info on this link filters

Peter Disuja

Joined: Jul 02, 2010
Posts: 4
Filter is basically used to filter the request and responce. It is a certain API defined by the Filter, FilterChain, and FilterConfig interfaces in the javax.servlet package. With the help of this unwanted data refined by the filter and only required data only goes to server.

Peter pal Disuja
Alpesh Padra
Ranch Hand

Joined: Jan 10, 2010
Posts: 41
This might help to understand filter better way
I agree. Here's the link:
subject: filter
It's not a secret anymore!