java.io.FileNotFoundException 没有此类文件或目录错误,但目录存在
我在应用程序目录中收到 filenotfoundException,但我的目录显然存在。我正在本地机器上执行此操作。我正在向 servlet 发送一个非常简单的帖子。有谁知道会发生什么?
I'm getting the filenotfoundexception on my apps directory but my directory clearly exists. I'm doing this on my local machine. I'm doing a very simple post to a servlet. Does anyone knw what could be happening?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
您是否具有对所有中间路径段的遍历权限以及对最终文件的适当权限?
Do you have traversal authority to all intervening path segments, and appropriate authority to the final file?
事实证明,这是由于我的防火墙 (firestarter) 阻止了我的服务器 IP 地址。我允许例外,一切正常。
it turns out this was due to my firewall (firestarter) blocking my servers ip address. I allowed the exception and everything worked.
一些想法(希望您还没有尝试过:-):
您有该目录的读取权限吗?
尝试输入类似的内容:
假设“目录”是保存目录的文件变量。
尝试输入类似:
并确保它返回 true。
A few of thoughts (hopefully you haven't tried them :-):
Do you have read access to the directory?
Try putting in something like:
Assuming "directory" is the File variables that holds the directory.
Try putting in something like:
and making sure it returns true.