BEA-101165 Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.FilterDispat

来源:互联网 发布:mac os x 10.9.5原版 编辑:程序博客网 时间:2024/06/05 09:22

最近在写一个struts2 应用,修改struts.xml是,后台报错:

BEA-101165 Could not load user defined filter in web.xml: org.apache.struts2.dispatcher.FilterDispatcher

struts.xml代码如下:

<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC         "-//Apache Software Foundation//DTD Struts Configuration 2.0//EN"         "http://struts.apache.org/dtds/struts-2.0.dtd"> <struts><!-- 该属性指定Struts 2应用所需要的国际化资源文件,如果有多份国际化资源文件,则多个资源文件的文件名以英文逗号(,)隔开。--><constant name="struts.custom.i18n.resources" value="globalMessages" /><!-- 指定Web应用的默认编码集,相当于调用HttpServletRequest的setCharacterEncoding方法 --><constant name="struts.i18n.encoding" value="UTF-8" /><!-- 该属性设置是否每次HTTP请求到达时,系统都重新加载资源文件。开发阶段设置true 生产模式设置false --><constant name="struts.i18n.reload" value="true" /><!--该属性设置当struts.xml文件改变后,系统是否自动重新加载该文件。该属性的默认值是false。 开发阶段最好true 生产模式设置false<constant name="struts.configuration.xml.reload" value="true" />--><!--对于某些Java EE服务器,不支持HttpServlet Request调用getParameterMap()方法,此时可以设置该属性值为true来解决该问题。该属性的默认值是false。对于WebLogic、Orion和OC4J服务器,通常应该设置该属性为true。--><constant name="struts.dispatcher.parametersWorkaround " value="true" /><!-- 设置浏览器是否缓存静态内容,默认值为true,开发阶段最好false 生产模式最好设置true--><constant name="struts.serve.static.browserCache " value="false" /><!-- 开发模式下设为true,这样可以打印出更详细的错误信息 生产模式设置false<constant name="struts.devMode" value="true" />--><!-- 如果前面的在获得一个有效的ActionMapper或Uri失败,一个复合的映射器能委托一系列的ActionMapper --><constant name="struts.mapper.composite" value="struts" /><!-- 标识默认的jar包--><constant name="struts.convention.default.parent.package" value="default-package" /> <!-- 指定Struts 2默认的ObjectFactory Bean,该属性默认值是spring --><constant name="struts.objectFactory" value="spring"/><include file="struts-hello.xml"/><include file="struts-json.xml"/> </struts>

代码中,我注释了两个常量,struts.configuration.xml.reload、struts.devMode,重启weblogic,后台未报错。至于为什么这两个常量设置时,后台报错,本人正在研究,后续更新。

原创粉丝点击