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.下面是 ...
随机推荐
- Bootstrap入门五:表格
table样式: .table:表格基本样式,很少的padding,灰色的细水平分隔线. .table-striped:斑马纹样式,隔行换色. .table-bordered:为表格和其中的每个单元格 ...
- 【Construct Binary Tree from Preorder and Inorder Traversal】cpp
题目: Given preorder and inorder traversal of a tree, construct the binary tree. Note:You may assume t ...
- Domain many-to-many
class TakeAwardAct { String title; static hasMany=[awards:Award] static constraints = { } String toS ...
- ThinkDev.Logging-Queue模块介绍
Queue,ThinkDev.Logging对内存级队列的封装. 主要针对需要简单进程内内存级队列提供支持,应用无需关心存储及线程. 配置例子: <!-- 队列对象 --> <Que ...
- 设计模式之中介者模式(Mediator)
中间者模者模式原理:中介者维持所有要交互对象的指针或者对象,所有对象维持一个中介者的指针或者对象. #include <iostream> #include <string> ...
- java socket 一个服务器对应多个客户端,可以互相发送消息
直接上代码,这是网上找的demo,然后自己根据需求做了一定的修改.代码可以直接运行 服务器端: package socket; import java.io.BufferedReader; impor ...
- Android Environment FAQ (Frequently Asked Question)
1.how to find out the Eclipse Version From Eclipse Menu Help ----> About Eclipse It displayed as ...
- poj 3662(经典最短路)
题目链接:http://poj.org/problem?id=3662 思路:这题较多的有两种做法: 方法1:二分枚举最大边长limit,如果图中的边大于limit,则将图中的边当作1,表示免费使用一 ...
- win10开机密码怎么取消
win10怎么取消电脑开机密码?比较快捷的方法就是使用netplwiz在WIN2000以后的版本都是适用.最新版的WIN10同样也是适用的.下面我来演示一下win10开机密码怎么取消? 1. WIN1 ...
- spring PropertyPlaceholderConfigurer 找不到配置文件原因
1: spring 版本问题 参见: http://www.cnblogs.com/alex-blog/archive/2012/12/25/2832357.html 2: bean id 同名 ...