web.xml的filter-mapping报错

发布时间:2019-07-29 16:12:00

The markup in the document following t
he root element must be well-formed.

补充:已经解决了,发现是好像缺某些配置,在MyEclipse中用xml(advanced templates)可以但xml(advanced templates)不行,在ee中在加入的filter部分外部加<xml-body></xml-body>即可

推荐回答

在研究liferay框架中看到Web.xml中加入了过滤器的标签,可以根据页面提交的URL地址进行过滤,发现有几个新标签没用过,下面就介绍以下几个过滤器的标签用法:<!-- 定义Filter --><filter><!-- Filter的名字 --><filter-name>log</filter-name><!-- Filter的实现类 --><filter-class>lee.LogFilter</filter-class></filter><!-- 定义Filter拦截的URL地址 --><filter-mapping><!-- Filter的名字 --><filter-name>log</filter-name><!-- Filter负责拦截的URL 全部以/的请求,如果<url-pattern>/*.action </>,将会以拦截*.action的请求--><url-pattern>/*</url-pattern></filter-mapping>

以上问题属网友观点,不代表本站立场,仅供参考!