如何在App Engine中回收/WEB-INF URL?
我希望所有 URL(映射到静态文件的 URL 除外)都由我的 Servlet 处理。
我已经正确设置了它,它的工作方式就像一个魅力除了,url /WEB-INF/
始终由 App-engine 中的静态文件处理程序处理。
即使我将其放入 appengine-web.xml
中:
<static-files>
<include path="/s/**" />
<exclude path="/WEB-INF" />
</static-files
它仍然静态处理 /WEB-INF
网址。 (/s/**
路径是我的应用程序特定的静态文件路径。)
此外,所有以 /WEB-INF
开头的路径也都是静态处理的,尽管文件实际上并没有按预期得到服务。
有没有办法阻止静态处理程序捕获 /WEB-INF
路径?
I want all URLs, except the ones that map to a static file, to be handled by my Servlet.
I have set it up correctly, and it works like a charm except that the url /WEB-INF/
gets always handled by the static file handler in App-engine.
Even if I put this in my appengine-web.xml
:
<static-files>
<include path="/s/**" />
<exclude path="/WEB-INF" />
</static-files
it still handles the /WEB-INF
url statically. (The /s/**
path is my app specific path to static files.)
Moreover, all paths beginning with /WEB-INF
are also handled statically, although the files are not actually served as expected.
Is there any way to stop the static handler from capturing the /WEB-INF
path?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
/WEB-INF
不是外部可访问的资源。您无法在浏览器中输入/WEB-INF/web.xml
,可以吗?它用作存储配置数据的服务器专用目录。
/WEB-INF
is not an externally accessible resource. You can not type/WEB-INF/web.xml
in your browser, can you?It is used as a server-private directory where configuration data is stored.