如何告诉 web.xml 它不应该处理 .htc 文件并将它们留给 Web 服务器?
如何告诉 web.xml 它不应该处理 .htc 文件并将它们留给 Web 服务器?
我怎样才能做到这一点?
我正在使用 Vaadin,它的 servlet 获取所有请求,但我确实需要提供一个 .htc 文件来修复 IE(微软的黎明)角落并使它们看起来更好。
怎么办呢?
Vaadin Servlet 映射
<前><代码>>> vaadinServlet >/* ; >
服务程序
> <servlet>
> <servlet-name>vaadinServlet</servlet-name>
> <servlet-class>com.vaadin.terminal.gwt.server.GAEApplicationServlet</servlet-class>
<init-param>
> <description>
> Application widgetset</description>
> <param-name>widgetset</param-name>
> <param-value>web.googlemapwidget.Widgetset</param-value>
> </init-param> </servlet>
How to tell web.xml that it should not handle .htc files and so leave them to the web server?
How can I do that ?
I am using Vaadin and it's servlet gets all requests, but I really need to serve a .htc file to fix IE(Dawn you Microsoft) corners and make them look better.
How to do that ?
Vaadin Servlet Mapping
> <servlet-mapping> > <servlet-name>vaadinServlet</servlet-name> > <url-pattern>/*</url-pattern> > </servlet-mapping>
Servlet
> <servlet>
> <servlet-name>vaadinServlet</servlet-name>
> <servlet-class>com.vaadin.terminal.gwt.server.GAEApplicationServlet</servlet-class>
<init-param>
> <description>
> Application widgetset</description>
> <param-name>widgetset</param-name>
> <param-value>web.googlemapwidget.Widgetset</param-value>
> </init-param> </servlet>
请注意,vaadinServlet 的
url-pattern
从/*
更改为/
,这是默认映射。这意味着如果没有其他模式匹配,则使用此 servlet。这是快速参考 我写了关于 url 模式映射的文章。You will need to define your static servlet. This depends on your servlet container. For tomcat,
如果您不希望 staticServlet 依赖于 servlet 容器,请阅读 这个。
Notice that the
url-pattern
for vaadinServlet is changed from/*
to/
, which is the default mapping. It means if no other pattern is matched then use this servlet. Here is a quick reference I wrote about the url pattern mapping.You will need to define your static servlet. This depends on your servlet container. For tomcat,
In case you do not want your staticServlet to depends on the servlet containter, read this.