问题描述:
Struts2.2.1+Spring3.0.4.RELEASE+Hibernate3.5.1-Final
Spring Security 3.0.4.RELEASE未配置Spring Security时一切正常。
加上Spring Security之后,访问任何Action都出现Action返回找不到jsp的错误:其中web.xml相关配置如下:   <listener>
        <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
    </listener>    <context-param>
        <param-name>contextConfigLocation</param-name>
        <param-value>classpath*:applicationContext*.xml</param-value>
    </context-param>    <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>    <filter>
        <filter-name>struts2</filter-name>
        <!--<filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>-->
        <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
        <init-param>
            <param-name>actionPackages</param-name>
            <param-value>com.mydomain.apps.**.action</param-value>
        </init-param>
    </filter>    <filter-mapping>
        <filter-name>struts2</filter-name>
        <url-pattern>*.action</url-pattern>
    </filter-mapping>  
application-security.xml配置如下:
<?xml version="1.0" encoding="UTF-8"?><b:beans xmlns="http://www.springframework.org/schema/security"
         xmlns:b="http://www.springframework.org/schema/beans"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
                        http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">    <global-method-security
            jsr250-annotations="enabled" secured-annotations="enabled" pre-post-annotations="enabled">
    </global-method-security>
    <http>
        <anonymous enabled="true"/>
        <intercept-url pattern="/favicon.ico" filters="none"/>
        <intercept-url pattern="/images/*" filters="none"/>
        <intercept-url pattern="/js/*" filters="none"/>
        <intercept-url pattern="/css/*" filters="none"/>
        <intercept-url pattern="/auth/*" filters="none"/>
        <intercept-url pattern="/WEB-INF/content/**" filters="none"/>
        <intercept-url pattern="/config-browser/*" filters="none"/>
        <intercept-url pattern="/base2/*" filters="none"/>
        <intercept-url pattern="**jsp" filters="none"/>
        <intercept-url pattern="/**" access="ROLE_USER"/>        <logout logout-success-url="/auth/openIdAuth.action?op=logout"/>
        <openid-login login-page="/auth/openIdAuth.action" authentication-failure-url="/auth/openIdAuth.action?error=true&amp;op=error">
            <attribute-exchange>
                <openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="2"/>
                <openid-attribute name="name" type="http://schema.openid.net/namePerson/friendly"/>
            </attribute-exchange>
        </openid-login>        <session-management
                invalid-session-url="/auth/openIdAuth.action?error=true"
                session-authentication-error-url="/auth/openIdAuth.action?limit=true"
                >
            <concurrency-control max-sessions="1"
                                 error-if-maximum-exceeded="true"
                                 expired-url="/auth/openIdAuth.action?timeout=true"/>
        </session-management>
    </http>    <authentication-manager>
        <authentication-provider user-service-ref='vtmBaseUserService'/>
    </authentication-manager></b:beans>
在这里先谢过了!