Spring security3.1集成Struts2的问题。困惑好几天了。

chitu11 2011-12-27 10:18:54
当我访问http://localhost/frameWork/create
的时候页面出现这个错误


Struts Problem Report

Struts has detected an unhandled exception:

Messages:
Cannot convert value of type [org.springframework.security.web.DefaultSecurityFilterChain] to required type [java.lang.String] for property 'fieldErrors[org.springframework.security.filterChains][0]': no matching editors or conversion strategy found
Failed to convert property value of type 'java.util.LinkedHashMap' to required type 'java.util.Map' for property 'fieldErrors'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.web.DefaultSecurityFilterChain] to required type [java.lang.String] for property 'fieldErrors[org.springframework.security.filterChains][0]': no matching editors or conversion strategy found
Unable to instantiate Action, com.sayablog.createEngine.action.CreateAtion, defined for 'create' in namespace '/'Failed to convert property value of type 'java.util.LinkedHashMap' to required type 'java.util.Map' for property 'fieldErrors'; nested exception is java.lang.IllegalStateException: Cannot convert value of type [org.springframework.security.web.DefaultSecurityFilterChain] to required type [java.lang.String] for property 'fieldErrors[org.springframework.security.filterChains][0]': no matching editors or conversion strategy found
File: jar:file:/C:/Tomcat%206.0/webapps/frameWork/WEB-INF/lib/org.springframework.beans-sources-3.0.4.RELEASE.jar!/org/springframework/beans/TypeConverterDelegate.java
Line number: 231
else {
msg.append(": no matching editors or conversion strategy found");
throw new IllegalStateException(msg.toString());
}
}


当我访问http://localhost/frameWork/jsp/a.jsp
的时候正常访问的a.jsp页面


Struts2 的ation 配置

<package name="default" namespace="/" extends="struts-default">

<action name="create" method="execute" class="com.sayablog.createEngine.action.CreateAtion">
<result name="success">/jsp/a.jsp</result>
</action>
</package>


web.xml的配置

	<!-- Spring -->
<context-param>
<param-name>contextConfigLocation</param-name>
<param-value>
classpath:applicationContext.xml,
classpath:applicationContext-security.xml
</param-value>
</context-param>

<!-- spring filter -->

<filter>
<filter-name>springSecurityFilterChain</filter-name>
<filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
</filter>
<filter-mapping>
<filter-name>springSecurityFilterChain</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


<!-- Struts2 -->
<filter>
<filter-name>struts2</filter-name>
<filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
</filter>

<filter-mapping>
<filter-name>struts2</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>


<listener>
<listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
</listener>
<listener>
<listener-class>
org.springframework.security.web.session.HttpSessionEventPublisher</listener-class>
</listener>


求高人解答,解惑

...全文
331 4 打赏 收藏 举报
写回复
4 条回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
chitu11 2011-12-28
不能这样沉下去啊
  • 打赏
  • 举报
回复
chitu11 2011-12-27
帮忙啦~~
  • 打赏
  • 举报
回复
chitu11 2011-12-27
[Quote=引用 1 楼 chigao520 的回复:]

应该还是配置的问题,在网上找找相关的例子吧。
[/Quote]

过滤器配置了几次结果还是不理想!
  • 打赏
  • 举报
回复
金先生1 2011-12-27
应该还是配置的问题,在网上找找相关的例子吧。
  • 打赏
  • 举报
回复
发帖
Java EE

6.7w+

社区成员

J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
帖子事件
创建了帖子
2011-12-27 10:18
社区公告
暂无公告