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

最近在写一个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,后台未报错。至于为什么这两个常量设置时,后台报错,本人正在研究,后续更新。

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值