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.下面是 ...
随机推荐
- 团队项目——特定功能NABC
我们要做的项目是截屏软件,目前决定做电脑端的应用 我觉得这个软件应该具有随意截屏的功能,就是可以用鼠标拖动线条,只要形成闭合图形就可以将线条内的图像截取出来: NABC模型: N(Need): 许多人 ...
- 解释型语言和编译型语言如何交互?以lua和c为例
转自http://my.oschina.net/mayqlzu/blog/113528 问题: 最近lua很火,因为<愤怒的小鸟>使用了lua,ios上有lua解释器?它是怎么嵌入大ios ...
- Careercup - Microsoft面试题 - 6282862240202752
2014-05-11 03:56 题目链接 原题: Given an integer array. Perform circular right shift by n. Give the best s ...
- SAXReader
DOM4j读取XML文件(SAXReader) 一. 总结: Document document=new SAXReader.reader(“xml文路径/文件名xxx.xml”);//得到Docum ...
- 小技巧--字符串输入从a[1]开始
char a[100],b[100]; cin>>a>>(b+1);//cin: abcd abcd cout<<a[1]<<endl<<b ...
- Dijkstra--POJ 2502 Subway(求出所有路径再求最短路径)
题意: 你从家往学校赶,可以用步行和乘坐地铁这两种方式,步行速度为10km/h,乘坐地铁的速度为40KM/h.输入数据的第一行数据会给你起点和终点的x和y的坐标.然后会给你数目不超过200的双向地铁线 ...
- POJ2676-Sudoku(数独)
想了好久没想到好的解决办法,参考了 http://user.qzone.qq.com/289065406/blog/1303713313 大致题意: 九宫格问题,也有人叫数独问题 把一个9行9列的网格 ...
- 如何用javascript正则表达式验证身份证号码是否合法
在用户注册页面有些需求要求的比较严格,需要对身份证js验证是否合法,通过此功能严格此系统软件,从而过滤到很多水客.下面就此实现方法给大家讲解下. 很多时候我们都是通过一组正则表达式来判断用户输入的身份 ...
- zoj 1450 Minimal Circle 最小覆盖圆
题目链接:http://acm.zju.edu.cn/onlinejudge/showProblem.do?problemId=450 You are to write a program to fi ...
- C# TcpListener的编程要点
using System; using System.Collections.Generic; using System.Linq; using System.Net; using System.Ne ...