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>


求高人解答,解惑

...全文
412 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
chitu11 2011-12-28
  • 打赏
  • 举报
回复
不能这样沉下去啊
chitu11 2011-12-27
  • 打赏
  • 举报
回复
帮忙啦~~
chitu11 2011-12-27
  • 打赏
  • 举报
回复
[Quote=引用 1 楼 chigao520 的回复:]

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

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

67,549

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧