struts2与struts1整合,Unable to load configuration. - interceptor-ref ... struts.xml
struts.xml中为了与struts1的MVC模式整合,需要类似如下的拦截器的引用
<interceptor-stack name="integration">
<interceptor-ref name="static-params"/>
<interceptor-ref name="loginForm"/>
<interceptor-ref name="model-driven"/>
<interceptor-ref name="actionForm-reset"/>
<interceptor-ref name="basicStack"/>
<interceptor-ref name="actionForm-validation"/>
<interceptor-ref name="workflow"/>
</interceptor-stack>
这里面拦截器的name有问题(我是从教材的源代码直接拷贝过来的)
查看struts2-struts1-plugin-2.3.16.3.jar里面的struts-plugin.xml
可以看到上面引用的拦截器的名字是
<interceptors>
<interceptor name="actionForm-reset" class="org.apache.struts2.s1.ActionFormResetInterceptor"/>
<interceptor name="actionForm-validation" class="org.apache.struts2.s1.ActionFormValidationInterceptor"/>
<interceptor name="actionForm-commonsValidation" class="org.apache.struts2.s1.ActionFormValidationInterceptor">
<param name="pathnames">/org/apache/struts/validator/validator-rules.xml,/WEB-INF/validation.xml</param>
</interceptor>
<interceptor-stack name="struts1Stack">
<interceptor-ref name="staticParams"/>
<interceptor-ref name="scopedModelDriven"/>
<interceptor-ref name="modelDriven"/>
<interceptor-ref name="actionForm-reset"/>
<interceptor-ref name="basicStack"/>
<interceptor-ref name="actionForm-validation"/>
<interceptor-ref name="workflow"/>
</interceptor-stack>
</interceptors> <default-interceptor-ref name="struts1Stack"/>
所以,应该是staticParams,modelDriven,而不是static-params,model-driven
struts2与struts1整合,Unable to load configuration. - interceptor-ref ... struts.xml的更多相关文章
- 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration.
启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. 出现此异常是因为,str ...
- 严重: Exception starting filter struts2 --Unable to load configuration
严重: Exception starting filter struts2 Unable to load configuration. - [unknown location] at com.open ...
- 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. - Class: java.net.PlainSocketImpl
今天刚好宿舍断网,打开电脑,打开ide工具,启动tomcat后,访问web项目工程,页面显示404,查看控制台,运行报错信息如下: 严重: Exception starting filter stru ...
- 关于 struts2 Unable to load configuration. - action
<?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "- ...
- SSH框架整合,启动Tomcat报错:Unable to load configuration
报错信息: 严重: Dispatcher initialization failed Unable to load configuration. - bean - file:/E:/MIKEY/mik ...
- Struts2中的Unable to load configuration错误的分析与解决方法
当我们遇到 Unable to load configuration. 这样的错误时,可以根据具体的错误提示找出错误的原因. Unable to load configuration. - inter ...
- Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl
[Bug笔记]Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl 标签: bugjartomcat服务器互联 ...
- tomcat启动异常(严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] )
严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opens ...
- 报错:Unable to load configuration. - action - file:/E:/apache-tomcat-8.0.37/webapps/20161102-struts2-3/WEB-INF/classes/struts.xml:11:73
第一种报错: 严重: Exception starting filter struts2Unable to load configuration. - action - file:/E:/apache ...
- struts2与struts1整合,java.lang.InstantiationException, Exception occurred during processing request: null
做了2个action,其中一个运行没有问题,另一个报错,看下面的报错信息,再看了看struts.xml,因为没有给GetBooks这个action配置actionform,所以就导致报null.下面是 ...
随机推荐
- nodejs笔记二--文件I/O;
一.写入文件: fs.writeFile(filename, data, callback),数据参数可以是string或者是Buffer,编码格式参数可选,默认为"utf8",回 ...
- ScrollView图片分页显示-简单
用到的控件: 1>UIScrollView:宽度和图片的宽度一样,因为分页的代码就一句 // 设置分页,这个分页的原理实际上是按照ScrollView的宽进行分页的,这里的图片的宽由于和Scro ...
- 向Array中添加改进的冒泡排序
改进冒泡思路 如果在某次的排序中没有出现交换的情况,那么说明在无序的元素现在已经是有序了,就可以直接返回了. 改进冒泡实现 Function.prototype.method = function(n ...
- python 数据结构-列表
列表常用方法汇总: #定义列表li li=[12.23,456,88,9] a=[1,2,3] #添加元素到列表结尾 li.append(360) #追加列表元素extend(L) li.extend ...
- hibernate---table_Generator
首先讲一下调试技巧:: @javax.persistence.TableGenerator( name="Teacher_GEN", table="GENERATOR_T ...
- 01.Redis安装
1.安装Redis 1.下载.解压Redis [lizhiwei@localhost Redis]$ ll total 1248 -rwxrwxr-x. 1 lizhiwei lizhiwei 127 ...
- 【BZOJ】【1010】【HNOI2008】玩具装箱Toy
DP/斜率优化 根据题目描述很容易列出动规方程:$$ f[i]=min\{ f[j]+(s[i]-s[j]+i-j-1-L)^2 \}$$ 其中 $$s[i]=\sum_{k=1}^{i} c[k] ...
- IIS Express 及 vs2008下使用IIS Express
介绍 IIS Express 开发 ASP.NET 的应用程序是我的主要工作.当然我会选择最适合的开发环境.客户多属于企业用户,我的开发的选择,多半是 ASP.NET Web Application ...
- 上海9000辆出租车上铺设免费微信连WiFi
据了解,去年7月,2000辆贴有Wi-Fi标识的上海大众出租车已经正式上路.近期,为了加大方便市民的力度,上海云联将上海大众等9000辆出租车上铺设免费微信连WiFi,为上海乘客提供简单便捷的微信连W ...
- mysql date数据类型异常原因0000-00
1.数据库字段: `dri_lic_first_time` date DEFAULT NULL COMMENT '驾驶证初次领证日期', 2.异常信息 org.springframework.dao. ...