JWorld@TW the best professional Java site in Taiwan
      註冊 | 登入 | 全文檢索 | 排行榜  

» JWorld@TW » Web Framework » Spring web MVC  

按列印兼容模式列印這個話題 列印話題    把這個話題寄給朋友 寄給朋友    訂閱主題
reply to postflat modego to previous topicgo to next topic
本主題所含的標籤
無標籤
作者 Spring MVC 整合 Acegi
sam_huang74_pc





發文: 13
積分: 0
於 2007-07-30 01:50 user profilesend a private message to userreply to postreply to postsearch all posts byselect and copy to clipboard. 
ie only, sorry for netscape users:-)add this post to my favorite list
請問一下 Spring MVC + Acegi , 下面紅色那一段是否是多餘的 , 可是如果不這樣設定 , *.do 的網頁都會找不到 , 這樣的配置是否恰當 , 謝謝

<?xml version="1.0" encoding="UTF-8"?>
<web-app xmlns="http://java.sun.com/xml/ns/j2ee"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
  version="2.4">

  <session-config>
    <session-timeout>30</session-timeout>
  </session-config>

<!-- springframework 處理utf-8編碼 Start -->
  <filter>
    <filter-name>encodingFilter</filter-name>
    <filter-class>
      org.springframework.web.filter.CharacterEncodingFilter
    </filter-class>
    <init-param>
      <param-name>encoding</param-name>
      <param-value>UTF-8</param-value>
    </init-param>
    <init-param>
      <param-name>forceEncoding</param-name>
      <param-value>true</param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>encodingFilter</filter-name>
    <servlet-name>dispatcherServlet</servlet-name>
  </filter-mapping>
<!-- springframework 處理utf-8編碼 End -->  

  
  <!-- Acegi 的 Filter Chain 代理 Start -->
  <context-param>
    <param-name>contextConfigLocation</param-name>
    <param-value>/WEB-INF/web-config.xml,/WEB-INF/model-config.xml,/WEB-INF/security-config.xml,/WEB-INF/schedule-config.xml</param-value>
  </context-param>  
  <filter>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <filter-class>
      org.acegisecurity.util.FilterToBeanProxy
    </filter-class>
    <init-param>
      <param-name>targetClass</param-name>
      <param-value>
        org.acegisecurity.util.FilterChainProxy
      </param-value>
    </init-param>
  </filter>
  <filter-mapping>
    <filter-name>Acegi Filter Chain Proxy</filter-name>
    <url-pattern>/*</url-pattern>
  </filter-mapping>
  <!-- Acegi 的 Filter Chain 代理 End -->  
    
  <!-- ContextLoaderListener 預設會讀取 applicationContext.xml OR 參考 contextConfigLocation -->
  <listener>
    <listener-class>
      org.springframework.web.context.ContextLoaderListener
    </listener-class>
  </listener>  

  <servlet>
    <servlet-name>dispatcherServlet</servlet-name>
    <servlet-class>
      org.springframework.web.servlet.DispatcherServlet
    </servlet-class>
    <init-param>
      <param-name>contextConfigLocation</param-name>
      <param-value>/WEB-INF/web-config.xml,/WEB-INF/model-config.xml,/WEB-INF/security-config.xml,/WEB-INF/schedule-config.xml</param-value>
    </init-param>
    <load-on-startup>1</load-on-startup>
  </servlet>
  <servlet-mapping>
    <servlet-name>dispatcherServlet</servlet-name>
    <url-pattern>*.do</url-pattern>
  </servlet-mapping>  
  

</web-app>


reply to postreply to post
話題樹型展開
人氣 標題 作者 字數 發文時間
4198 Spring MVC 整合 Acegi sam_huang74_pc 2617 2007-07-30 01:50
3575 Re:Spring MVC 整合 Acegi koji 47 2007-07-30 20:43
3628 Re:Spring MVC 整合 Acegi sam_huang74_pc 90 2007-07-31 00:27
3536 Re:Spring MVC 整合 Acegi koji 1288 2007-07-31 08:02
3783 Re:Spring MVC 整合 Acegi sam_huang74_pc 1398 2007-08-02 03:58
» JWorld@TW »  Web Framework » Spring web MVC

reply to postflat modego to previous topicgo to next topic
  已讀文章
  新的文章
  被刪除的文章
Jump to the top of page

JWorld@TW 本站商標資訊

Powered by Powerful JuteForum® Version Jute 1.5.8