1
我們在我們的網站上使用sitemesh作裝飾。我們有一個錯誤頁面,我們不想將修飾器應用到它。錯誤頁面出現以防發生異常(我們很少希望),而不是404,這是另一個頁面。從錯誤頁面刪除裝飾師頁面
該錯誤頁面通過彈簧控制器調用,並在web.xml定義如下:
<error-page>
<exception-type>java.lang.Exception</exception-type>
<location>/view/errorpage/display</location>
</error-page>
在
web.xml
SiteMesh的配置如下:
<filter-mapping>
<filter-name>sitemesh</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
最後,錯誤控制器排除在decorators.xml
如下:
<excludes>
<pattern>/view/errorpage*</pattern>
</excludes>
但是這並不能解決問題,因爲裝飾器頁面仍然應用於錯誤頁面。請問有什麼我錯過了嗎?
謝謝!
Krt_Malta