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

你离开我真会死。 提交于 2020-01-06 19:33:24

问题


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.

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.

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.

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

Both source and destination are shared folders.


回答1:


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.



来源:https://stackoverflow.com/questions/5154387/backup-of-projects-on-daily-basis-to-a-backup-server

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!