[英]How to map a filter for welcome-file in web.xml for Tomcat?
[英]Filter not triggered because of welcome-file
我有沒有被觸發的過濾器(可能是由於歡迎文件)
<filter>
<filter-name>gwtCacheControlFilter</filter-name>
<filter-class>com.me.server.GWTCacheControlFilter</filter-class>
</filter>
<filter-mapping>
<filter-name>gwtCacheControlFilter</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>
定義歡迎文件的位置:
<welcome-file-list>
<welcome-file>app.html</welcome-file>
</welcome-file-list>
訪問localhost:8080
,它將自動返回app.html。 我無法刪除該歡迎文件,因為我需要在訪問該網站時自動顯示主頁。
要使過濾器正常工作,可以采取什么解決方案?
編寫重定向jsp並將其用作歡迎頁面。
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
請參閱在JSP中重定向頁面?
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.