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

What are the skills required for core java?

545


What is meant by distributed application? Why are we using that in our application?

557


Is a case study a method or methodology?

469


Is nullpointerexception checked or unchecked?

559


How does a for loop work?

512






What are the types of java?

611


What are memory tables?

612


What is unicode used for?

575


What is array in java?

537


What all access modifiers are allowed for top class ?

715


What is the main difference between java platform and other platforms?

511


Can each java object keep track of all the threads that want to exclusively access it?

544


What is the maximum size of array in java?

518


Is alive and join method in java?

542


Is boolean a wrapper class in java?

608