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的更多相关文章

  1. 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration.

    启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. 出现此异常是因为,str ...

  2. 严重: Exception starting filter struts2 --Unable to load configuration

    严重: Exception starting filter struts2 Unable to load configuration. - [unknown location] at com.open ...

  3. 启动tomcat后struts框架报异常严重: Exception starting filter struts2 Unable to load configuration. - Class: java.net.PlainSocketImpl

    今天刚好宿舍断网,打开电脑,打开ide工具,启动tomcat后,访问web项目工程,页面显示404,查看控制台,运行报错信息如下: 严重: Exception starting filter stru ...

  4. 关于 struts2 Unable to load configuration. - action

    <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE struts PUBLIC "- ...

  5. SSH框架整合,启动Tomcat报错:Unable to load configuration

    报错信息: 严重: Dispatcher initialization failed Unable to load configuration. - bean - file:/E:/MIKEY/mik ...

  6. Struts2中的Unable to load configuration错误的分析与解决方法

    当我们遇到 Unable to load configuration. 这样的错误时,可以根据具体的错误提示找出错误的原因. Unable to load configuration. - inter ...

  7. Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl

    [Bug笔记]Unable to load configuration. - Class: java.net.AbstractPlainSocketImpl 标签: bugjartomcat服务器互联 ...

  8. tomcat启动异常(严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] )

    严重: Dispatcher initialization failed Unable to load configuration. - [unknown location] at com.opens ...

  9. 报错: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 ...

  10. struts2与struts1整合,java.lang.InstantiationException, Exception occurred during processing request: null

    做了2个action,其中一个运行没有问题,另一个报错,看下面的报错信息,再看了看struts.xml,因为没有给GetBooks这个action配置actionform,所以就导致报null.下面是 ...

随机推荐

  1. 站立会议 ~NO.1

    Yesterday:None Today: Search for offline maps of our school and testify the veracities of it Problem ...

  2. "Mac OS X"想要进行更改。键入管理员的名称和密码以允许执行此操作("Mac OS X"想使用系统钥匙串)

    不知什么时候开始,每次我在运行xcode在真机上,或者archive打包的时间,都会弹出输入用户名和密码的框,搞的烦死了: 解决方法: 打开钥匙串访问 双击那些密钥弹出框: 改变到允许所有应用程序访问 ...

  3. Careercup - Google面试题 - 4877486110277632

    2014-05-08 05:16 题目链接 原题: Given a circle with N defined points and a point M outside the circle, fin ...

  4. js分页

    今天看了下妙味课堂的教程,写了下关于分页的js代码,写完的感觉就是有点小麻烦,需要很多if判断,思路要清晰 点击预览:http://peng666.github.io/blogs/page <! ...

  5. C++ Template之技巧性基础知识

    1.对于T是自定义类型的,如果存在子类型则需要在模版内部加上typename 示例代码: template<typename T> class Myclass { typename T:: ...

  6. UIFontFamily

    Family: Hiragino Kaku Gothic ProN W3     Font: HiraKakuProN-W3 Family: Courier     Font: Courier     ...

  7. WPF 与Surface 2.0 SDK 亲密接触 - ScatterView 数据绑定篇

    与我们常用的一些WPF 控件相同,ScatterView 控件也支持数据绑定功能.本篇将演示如何利用ScatterView 绑定Win7 系统中的样例图片,并且每张图片会以独立的ScatterView ...

  8. TestDriven.Net

    转: http://www.cnblogs.com/AlexLiu/archive/2008/12/01/1345002.html

  9. 15 个最佳的 jQuery 表格插件

    现如今,网站开发设计的需求会要求自动适应所有移动设备,即响应式网站: 在开发网站时必须考虑对平板设备融合 fluid(流)和自适应性特点. 大多数网站设计要靠margins, guides, rows ...

  10. applicationContext.xml xxx-servlet.xml

    applicationContext.xml是随ContextLoaderListener的加载而执行的,而xxx-servlet.xml是随DispatcherServlet的加载而执行的,在web ...