4

Is there a way to use the context-params inside the web.xml

example

<context-param>
    <param-name>AUTH_SERVER</param-name>
    <param-value>10.126.35.10</param-value>
</context-param>
...

<filter>
    <filter-name>NtlmHttpFilter</filter-name>
    <filter-class>jcifs.http.NtlmHttpFilter</filter-class>
    <init-param>
        AUTH_SERVER
    </init-param>
...
4

1 回答 1

1

When you implement the filter probably you have to read the <init-param> parameter of the filter. There, instead of reading the parameter of the filter, you can read directly the context param, using:

filterConfig.getServletContext().getInitParameter("paramName");

Does that solve your matter?

于 2013-09-23T08:47:05.833 回答