我想在我的 WAR 中包含一些类可以访问但 Tomcat 永远不会直接提供服务的文件。我可以想出很多可以做到这一点的方法,但我很确定我应该有一种规范的方法来做到这一点。推荐引用。
最佳答案
WEB-INF
下的文件似乎是 Tomcat 中的标准以及其他应用服务器。
Sun's official-enough article说:
The WEB-INF directory is special. The files there are not served directly to the client; instead, they contain Java classes and configuration information for the Web app. The directory behaves like a jar file's META-INF directory; it contains metainformation about the archive contents.
关于tomcat - 部署非可服务资源的正确方式,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5543619/