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. 解决a different object with the same identifier value was already associated with the session错误

    [转]解决a different object with the same identifier value was already associated with the session错误 这个错 ...

  2. bzoj 1196 二分+生成树判定

    我们先二分一个答案,对于每个答案,先加一级公路,如果不够k直接break, 然后再加二级公路,加的过程类似Kruskal. /************************************* ...

  3. 【BZOJ】【1025】【SCOI2009】游戏

    DP/整数拆分 整个映射关系可以分解成几个循环(置换群的预备知识?),那么总行数就等于各个循环长度的最小公倍数+1(因为有个第一行的1~N).那么有多少种可能的排数就等于问有多少种可能的最小公倍数. ...

  4. Hibernate中查询数据转成VO对象及注意问题

    大家都可能会遇到,在用json传输数据时,很多字段是来自不同的表数据,需要我们进行封装数据. hibernate提供这么一个方法用来直接封装查询属性: query.setResultTransform ...

  5. NYOJ-86 找球号(一)AC 分类: NYOJ 2014-02-02 10:45 160人阅读 评论(0) 收藏

    NO.1 单纯的傻傻的代码: #include<stdio.h> long long num[100000005]={0}; int main(){ int n, m, k; scanf( ...

  6. Centos最小化安装后联网配置

    Centos最小化安装默认不开启网络,只需进行简单配置就可以上网了. 1.  查看/etc/sysconfig/network-scripts/下面的文件,这里会有一个ifcfg-en******(这 ...

  7. 使用Provider时提示:Unable to get provider...

    具体原因还不清楚,只是找到了原因: 这是因为自定义的Provider放的包路径不对,自定义的Provider应该放到和MainActivity同一个包中.

  8. Build Simple HTTP server

    1. The server just support POST&PUT method 2. It is a Python server, and save upload files in sp ...

  9. 使用Visual Studio 2012 开发 Html5 应用

    Visual Studio 一直以来是开发微软旗下应用的利器,只要是开发微软相关的应用无论是Windows程序,WPF,Asp.Net,WinRT Surface,WindowsPhone 等微软旗下 ...

  10. ErrorCode枚举类型返回错误码信息测试,手动抛出异常信息,在事务中根据错误码来回滚事务的思路。

    ErrorCode.java 简单测试代码,具体应用思路:手动抛出异常信息,在事务中根据错误码来回滚事务的思路. public enum ErrorCode { //系统级 SUCCESS(" ...