what is filters and its use?

Answers were Sorted based on User's Feedback



what is filters and its use?..

Answer / guru

filters r java classes which is intercept the client request
before it access a resource in server,then it intercept
server response before its reach clint

request filter

for security

response filter

compresed data

init(),do filter(),destroy are methods of filter

Is This Answer Correct ?    3 Yes 0 No

what is filters and its use?..

Answer / puneet

The ans cudhave been more precise: let me try :)
The filters are basically used when we need to change the
response sent back to the client like implementing
restrictions to few of the resources dependent on the user
who logs in like we dnt need to show few pages to few users
from a website then we need to make that logic in a new
class which implements filter interface and need to write
down the logic in the dofilter method which takes the
response and request objects which can be altered and
changed and the object of this class can be called dependent
on the condition of met on which we want to implement the
restrictions.

We can also use this interface to change the behavior of the
response.

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More Core Java Interview Questions

When we give defination of interface method in the class why method must be public???

2 Answers  


how we can use debug in myeclipse 6.0 in order solve the problems that exist in our program when there are 900 to 1000 pages in a web application

0 Answers   SAP Labs,


Discuss about garbage collector in Java.

0 Answers   Agilent, Integreon, ZS Associates,


What are the important features of Java 9 release?

0 Answers  


What is the argument in java?

0 Answers  


Why is java so popular?

0 Answers  


How will you call an Applet using Java Script Function?

0 Answers  


In how many ways we can create threads in java?

0 Answers  


Can a final method be overloaded?

0 Answers  


Can constructor be static or final?

0 Answers  


Does java return by reference?

0 Answers  


Can you declare an interface method static?

0 Answers  


Categories