4
回答
SSH2 集成axis springSecurity 配置问题
终于搞明白,存储TCO原来是这样算的>>>   

  之前已经完成ssh2集成springsecurity 了 ,现在是在已有的项目中集成axis1.4

我现在碰到一个问题 在web.xml配置如下

<?xml version="1.0" encoding="UTF-8"?>

<web-app version="2.5" 

xmlns="http://java.sun.com/xml/ns/javaee" 

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 

xsi:schemaLocation="http://java.sun.com/xml/ns/javaee 

http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

  <context-param>

  <param-name>contextConfigLocation</param-name>

  <param-value>

    classpath:/applicationContext.xml

  classpath:/applicationContext*.xml

   classpath:/security.xml 

  </param-value>

  </context-param>

  <filter>

     <filter-name>securityFilter</filter-name>

     <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>

     <init-param>

      <param-name>targetBeanName</param-name>

      <param-value>springSecurityFilterChain</param-value>

     </init-param>

  </filter>  

  <filter>

  <filter-name>struts2</filter-name>

  <filter-class>org.apache.struts2.dispatcher.ng.filter.StrutsPrepareAndExecuteFilter</filter-class>

  </filter>

  <servlet>   

<servlet-name>AxisServlet</servlet-name>   

<servlet-class>org.apache.axis.transport.http.AxisServlet</servlet-class>

</servlet>

 <servlet-mapping>  

  <servlet-name>AxisServlet</servlet-name>  

  <url-pattern>/services/*</url-pattern>  

 </servlet-mapping>

  <filter-mapping>

  <filter-name>securityFilter</filter-name>

  <url-pattern>/*</url-pattern>

  </filter-mapping>

 

     <filter-mapping>

  <filter-name>struts2</filter-name>

  <url-pattern>*.action</url-pattern>

  </filter-mapping>

  <servlet-mapping>    

<servlet-name>AxisServlet</servlet-name>   

<url-pattern>*.jws</url-pattern>

</servlet-mapping>

  <listener>

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

  </listener>

  <listener>

  <listener-class>org.springframework.web.util.IntrospectorCleanupListener</listener-class>

  </listener>

   <listener>

  <listener-class>org.springframework.web.context.request.RequestContextListener</listener-class>

  </listener>

 <mime-mapping>  

  <extension>wsdl</extension>  

  <mime-type>text/xml</mime-type>  

 </mime-mapping>  

 <mime-mapping>  

  <extension>xsd</extension>  

  <mime-type>text/xml</mime-type>  

 </mime-mapping> 

</web-app> 

 

为了 使axis中的services后显示 我把struts2的<url-pattern>由/*变为*.action 但是当我登录 admin后台的时候 发现 /j_spring_check找不到了  这个是springsecurity中默认的 但是因为url-pattern设置后 使其无效了    

现在就是想找一个办法来使  /j_spring_check 有效 并且 axis中的 /services/* 和 struts中的 /*均有效 

举报
vitou
发帖于5年前 4回/699阅
顶部