GlassFish V3 文件上传Servlet,文件访问问题

发布于 2024-10-19 18:38:43 字数 165 浏览 4 评论 0原文

我有更多的结构或权限问题,而不是实际的编码问题,我试图以最安全的方式上传文件,而不需要沿着将其插入数据库的路线。

我发现当我尝试在服务器上的应用程序外部存储文件时,我的应用程序被拒绝访问目录。

我没有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

谎言月老 2024-10-26 18:38:43

解决方案很简单,我使用 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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文