what is filters and its use?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Explain the private field modifier?

602


What is the base class in java from which all classes are derived?

507


What is vector capacity in java?

591


What is the difference between a factory and abstract factory pattern?

677


Can set contain duplicates?

536






What is the similarity between dynamic binding and linking?

599


What is use of static method?

528


Where import statement is used in a java program?

604


Is map sorted in java?

562


What are data types in oop?

539


What is the difference between post and put?

530


What is charat java?

534


what are different ways in which a thread can enter the waiting state? : Java thread

484


Explain the use of javap tool.

623


What is the range of a character variable?

535