문제

I am implementing URL Rewrite functionality and I have included all that is necessary for it in my project i.e. urlrewritefilter-4.0.3.jar in WEB-INF/lib and urlrewrite.xml in WEB-INF and added the following in web.xml

<filter>
<filter-name>UrlRewriteFilter</filter-name>
<filter-class>org.tuckey.web.filters.urlrewrite.UrlRewriteFilter</filter-class>
</filter>

<filter-mapping>
<filter-name>UrlRewriteFilter</filter-name>
<url-pattern>/*</url-pattern>
<dispatcher>REQUEST</dispatcher>
<dispatcher>FORWARD</dispatcher>
</filter-mapping>

But i am getting the following error,

unable to find urlrewrite conf file at /WEB-INF/urlrewrite.xml

Please give me suggestions as to what can be done to solve this.

도움이 되었습니까?

해결책

You could change the conf file in params. This could be added to the filter conf.

<!-- if you need to the conf file path can be changed
    it is specified as a path relative to the root of your context
    (default /WEB-INF/urlrewrite.xml) -->
    <init-param>
        <param-name>confPath</param-name>
        <param-value>/WEB-INF/urlrewrite.xml</param-value>
    </init-param>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top