Hi there, I'm taking the exam next thursday and I am now doing my final revision. I have a question about Filters... I noticed that an init method that receives a FilterConfig object is required in a filter class... It says in the HF book that we use it to save the config object for later...
In the mock exam of the chapter, it says that Filters cannot reeive initialisation parameters like servlets do...
So my question is what is this filterConfig object for? What does it contain? How do you initialise it?
Your help will be greatly appreciated!
posted 12 years ago
Hi, Filter can receive initialization parameters by calling FilterConfig.getInitParameter(). You can specify the initialization parameters same as you specify it for servlets. One can get ServletContext object also.
Hope that helps.
Sawan<br />SCJP,SCWCD,SCBCD<br /> <br />Every exit is an entry somewhere.
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads