Tomcat:java.io.IOException:Destination" xxx"目录无法创建“ [英] Tomcat: java.io.IOException : Destination "xxx" directory cannot be created"

查看:509
本文介绍了Tomcat:java.io.IOException:Destination" xxx"目录无法创建“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将项目从一个位置备份到network中的另一个位置。这个示例应用程序是用struts编写的。

这是通过使用 org.apache实现的。 commons.io.FileUtils

I would like to do projects backup from one location to another location in network.this sample application has been written in struts.
This was achieved by using org.apache.commons.io.FileUtils.

我的问题在于,当我在netbeans 6.9 IDE tomcat服务器中运行此应用程序时,它的工作正常,但是我尝试通过部署此应用程序WAR文件在apache tomcat 7.0服务器中运行此应用程序,我得到例外

My problem here is, when I ran this application in netbeans 6.9 IDE tomcat server its working fine, but when I tried to run this application in apache tomcat 7.0 server by deploying this application WAR file, I get exception like

java.io.IOException : Destination "xxx" directory cannot be created"

此目标路径是本地网络中的另一台计算机。

this destination path is another machine in our local network.

我假设某种netbeans IDE选项允许tomcat服务器在netbeans tomcat中运行它时将文件夹复制到目标目录。

I assume some kind of netbeans IDE options which are enabling tomcat server to copy folder to a destination directory when I ran it in netbeans tomcat.

其中,如果我在tomcat服务器中运行此应用程序,某种tomcat文件权限将被阻止。

where as, if I run this application in tomcat server some kind of tomcat file permissions are blocking.

source和destinati on是共享文件夹。

Both source and destination are shared folders.

推荐答案

您必须为Web应用程序设置权限(在您的情况下为文件权限) Tomcat运行安全管理器,以实现安全预防措施。有关配置,请参见此处

You will have to setup a permission (in your case File Permission) for your webapplication as Tomcat runs a Security Manager, for security precautions. See here for configuration.

这篇关于Tomcat:java.io.IOException:Destination" xxx"目录无法创建“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆