Home » Java » java – Web application error the content of element type "rule" must match-Exceptionshub

java – Web application error the content of element type "rule" must match-Exceptionshub

Posted by: admin February 25, 2020 Leave a comment

Questions:

I have a web application in Java that I need to compile. This application use UrlRewriteFilter (http://www.tuckey.org/urlrewrite/). I followed all the step for the configuration, so I added the library urlrewritefilter-4.0.3.jar in WEB-INF/lib, I added this snippet:

  <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>

in my web.xml and I created my urlrewrite.xml file.
At this point I have the following error that I can’t able to resolve:

enter image description here

Could anyone help me to resolve this?

Thx

How to&Answers: