[英]Filter not triggered because of welcome-file
I have this filter that is not getting triggered (perhaps due to the 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>
Where the welcome-file is defined: 定义欢迎文件的位置:
<welcome-file-list>
<welcome-file>app.html</welcome-file>
</welcome-file-list>
When localhost:8080
is access it automatically returns the app.html. 访问
localhost:8080
,它将自动返回app.html。 I cannot remove that welcome-file as I need that when the site is accessed it will automatically show the home page. 我无法删除该欢迎文件,因为我需要在访问该网站时自动显示主页。
What can be a work around for this scenario to make the Filter work? 要使过滤器正常工作,可以采取什么解决方案?
Write a redirect jsp and use it as welcome page. 编写重定向jsp并将其用作欢迎页面。
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.