GlassFish V3 文件上传Servlet,文件访问问题
我有更多的结构或权限问题,而不是实际的编码问题,我试图以最安全的方式上传文件,而不需要沿着将其插入数据库的路线。
我发现当我尝试在服务器上的应用程序外部存储文件时,我的应用程序被拒绝访问目录。
我没有 GlassFish 配置经验,欢迎您提供任何解决方案。
提前致谢。
I have more of a structure or permissions problem than an actual coding problem I am trying to upload a file in the most secure way possible without going down the route of inserting it into a database.
I am finding that when I try and store a file outside of the application on the server my application is being denied access to the directories.
I have no experience with GlassFish configuration and would welcome any solutions you can give.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
解决方案很简单,我使用 org.apache.commons.fileUpload 包并通过允许 Java 查询系统存储临时文件的位置来指定我自己的临时目录,问题已解决。
留在这里,这篇文章可能会对其他人有所帮助。
The solution was simple I was using the org.apache.commons.fileUpload package and specifying my own temporary directory by allowing Java to enquire of the system where to store temporary files the problem was removed.
Left here that this post may help others.