将文件存储在apache tomcat服务器的ROOT目录中
我想通过java代码将文件存储在Apache Tomcat服务器的ROOT目录中,那么如何做到这一点,因为目前我得到的上下文路径类似于c:\\.....\selfprov
所以我正在做 contextPath + File.seperator + "ROOT"
但它不会将文件存储在“ROOT”目录中,我认为我需要一些权限才能将文件存储在 ROOT 目录中,但我做到了但仍然没有存储。
I want to store file in the ROOT Directory of Apache Tomcat server through java code so How to do this, because currently I am getting a context path which comes like c:\\.....\selfprov
so I ma doing contextPath + File.seperator + "ROOT"
but it doesn't store the file inside "ROOT" directory i think i need some permission to store the fiule inside ROOT directory but i did that but still its not storing.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
阅读此示例 阅读此示例 http://www.tutorialspoint.com/servlets/servlets -file-uploading.htm 它有
Read this sample read this example http://www.tutorialspoint.com/servlets/servlets-file-uploading.htm it has