由于欢迎文件未触发过滤器
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
访问时自动 returns app.html。我无法删除该欢迎文件,因为我需要访问该站点时它会自动显示主页。
对于这种情况可以采取什么变通方法来使过滤器正常工作?
编写重定向 jsp 并将其用作欢迎页面。
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
见Redirect pages in JSP?
我的这个过滤器没有被触发(可能是因为欢迎文件)
<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
访问时自动 returns app.html。我无法删除该欢迎文件,因为我需要访问该站点时它会自动显示主页。
对于这种情况可以采取什么变通方法来使过滤器正常工作?
编写重定向 jsp 并将其用作欢迎页面。
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
见Redirect pages in JSP?