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 类的同一包中的 servlet 应用程序中我想将该位置传递给 FIleoutputStream 我为 getResourceAsStream 尝试过,直接提供该路径但它不起作用
该文件的路径是相对于 WEB-INF/classes 文件夹的。那么你在 getResourceAsStream 方法中作为 argumnet 给出了什么?那应该解决它。