I have a filter that looks like this:
<filter>
<filter-name>TestFilter</filter-name>
<filter-class>org.TestFilter</filter-class>
<init-param>
<param-name>timeout</param-name>
<param-value>30</param-value>
</init-param>
</filter>
Since we are talking ServletFilter and Servlets. Essentially, I am already in my servlet and have executed the first part of the doFilter. So the container must know the init-parameter. I don't have access to change the Filter class.
Is it possible to get the init-parameter value given an HttpServletRequest object?
The only solution I can think of is to read the web.xml as a resource and try to find the value manually. But it feels like there is a better solution.