How can a filter access initialization parameters set in the web.xml file?

  • Initialization parameters cannot be accessed by filters
  • Using the FilterConfig object
  • Using the HttpServletRequest object
  • Using the ServletContext object
A filter can access initialization parameters set in the web.xml file through the FilterConfig object, which is passed to the init() method of the filter. The getInitParameter() method of FilterConfig can be used to retrieve the parameter values.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *