posts - 19,  comments - 11,  trackbacks - 0

          Acegi缺省的port 映射是
          80->443 443->80
          8080->8443 8443->8080,
          如果你的tomcat 用別的port 比如7070(http) 7443(https), 如果不自己加入這些mapping 當path 需要在
          REQUIRES_SECURE_CHANNEL和REQUIRES_INSECURE_CHANNEL進行轉換的時候, acegi 就無法工作.

          解決問題是自己加入這些新的ports

            <bean id="secureChannelProcessor"
                  class
          ="org.acegisecurity.securechannel.SecureChannelProcessor" >
                  
          <property name="entryPoint">
                      
          <ref bean="retryWithHttps"/>
                  
          </property> 
              
          </bean>
              
          <bean id="insecureChannelProcessor"
                  class
          ="org.acegisecurity.securechannel.InsecureChannelProcessor">
                  
          <property name="entryPoint">
                      
          <ref bean="retryWithHttp"/>
                  
          </property>         
              
          </bean>

              
          <bean id="retryWithHttp" class="org.acegisecurity.securechannel.RetryWithHttpEntryPoint"> 
                  
          <property name="portMapper">
                      
          <ref bean="portMapperImpl"/>
                  
          </property>
              
          </bean>
              
              
          <bean id="retryWithHttps" class="org.acegisecurity.securechannel.RetryWithHttpsEntryPoint"> 
                  
          <property name="portMapper">
                      
          <ref bean="portMapperImpl"/>
                  
          </property>
              
          </bean>
                  
              
          <bean id="portMapperImpl" class="org.acegisecurity.util.PortMapperImpl">
                  
          <property name="portMappings">    
                       
          <map>
                           
          <entry key="80"><value>443</value></entry>
                           
          <entry key="443"><value>80</value></entry>
                             
          <entry key="8080"><value>8443</value></entry>    
                           
          <entry key="8443"><value>8080</value></entry>    
                             
          <entry key="7070"><value>7443</value></entry>    
                           
          <entry key="7443"><value>7070</value></entry>                     
                         
          </map>  
                     
          </property>
              
          </bean>


            
          這樣一來acegi 就知道該怎么做了

          posted on 2008-11-14 15:06 happyy2k 閱讀(1050) 評論(0)  編輯  收藏 所屬分類: Spring

          只有注冊用戶登錄后才能發表評論。


          網站導航:
           

          <2008年11月>
          2627282930311
          2345678
          9101112131415
          16171819202122
          23242526272829
          30123456

          常用鏈接

          留言簿(2)

          隨筆分類(20)

          隨筆檔案(12)

          搜索

          •  

          最新評論

          閱讀排行榜

          評論排行榜

          主站蜘蛛池模板: 宁晋县| 白山市| 徐闻县| 三原县| 洛隆县| 鲁山县| 内江市| 久治县| 济宁市| 南木林县| 建昌县| 扎兰屯市| 阿坝| 文水县| 台北市| 洮南市| 西畴县| 西乡县| 平湖市| 梅州市| 乌鲁木齐市| 巨鹿县| 姚安县| 宜君县| 灵宝市| 洱源县| 丹江口市| 武陟县| 文化| 元阳县| 涟水县| 宁陕县| 建瓯市| 麟游县| 东阳市| 雷波县| 崇信县| 怀仁县| 五河县| 常宁市| 高州市|