2011-08-27 86 views
1

我想爲我的GAE(struts 1.3,spring 2.5)基於應用程序使用sitemesh2.4。我找到了幾個配置sitemesh的教程。我做了完全一樣的。Sitemesh 2.4與GAE

的web.xml

<filter> 
     <filter-name>sitemesh</filter-name> 
     <filter-class>com.opensymphony.sitemesh.webapp.SiteMeshFilter</filter-class> 
    </filter> 

    <filter-mapping> 
     <filter-name>sitemesh</filter-name> 
     <url-pattern>*</url-pattern> 
    </filter-mapping> 

decorators.xml

<decorators defaultdir="/decorators/"> 
    <excludes> 
     <pattern>/**.xml</pattern> 
    </excludes> 
    <decorator name="base" page="base.jsp"> 
     <pattern>/*</pattern> 
    </decorator> 
</decorators> 

這個我創建了一個目錄裝飾後在base.jsp作爲裝飾。但是,當我訪問我的訪問localhost:8088 /裝飾器不適用。我正在使用intellij的想法,我附加了sitemesh的來源進行調試。當我啓動服務器時,SitemeshFilter的'init'方法被調用,但是當我訪問一個url時,'doFilter'方法甚至沒有被調用。

需要幫助。謝謝

回答

0

我找到了解決問題的辦法。其實我也使用urlrewriter過濾器。在我的web.xml中,我在sitemesh上面有這個過濾器,並且是問題所在。我移動了上面的sitemesh過濾器,現在它工作正常。