Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有 java bean 的 java webservice 应用程序。我如何确定 WEB-INF 目录中文件的完整路径。
你为什么需要这个?一种方法是从您的 jsp/servlet 通过getServletContext().getResourceAsStream("web-app/WEB-INF/...") 另外,如果您尝试在客户端上使用 .wsdl 文件,您最好指定服务器的 uri 而不是物理地址。
getServletContext().getResourceAsStream("web-app/WEB-INF/...")