IntelliJ需要将tomcat/conf目录复制到项目目录 [英] IntelliJ needs to copy tomcat/conf directory to project directory

查看:32
本文介绍了IntelliJ需要将tomcat/conf目录复制到项目目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个新安装的 Tomcat 7 服务器,我正在尝试让 IntelliJ 将 HelloWorld Spring MVC 应用程序部署到 Tomcat.

I have a freshly installed Tomcat 7 server, and I'm trying to make IntelliJ deploy a HelloWorld Spring MVC app to Tomcat.

我的Tomcat主页是/usr/share/tomcat7,Tomcat基地是/var/lib/tomcat7

My Tomcat home is /usr/share/tomcat7 and Tomcat base is /var/lib/tomcat7

然而,当我尝试运行该项目时,IntelliJ 抛出一个错误说:

However, when I try to run the project, IntelliJ throws an error saying:

Error running Tomcat : Error copy configuration files from/var/lib/tomcat7/conf to/home/adonis/.IntelliJIdea12/system/tomcat/Tomcat__SpringMVCApp/conf :/var/lib/tomcat7/conf/tomcat-users.xml(权限被拒绝)

这是屏幕截图 - http://i.imgur.com/CQ3z0e1.png

我需要设置任何权限吗?

Any permissions I need to set up?

推荐答案

确保 /var/lib/tomcat7/conf/ 目录下的文件对运行 IntelliJ IDEA 的用户具有读取权限.

Make sure that files under /var/lib/tomcat7/conf/ directory have read permission for the user IntelliJ IDEA is running from.

chmod -R 644 /var/lib/tomcat7/conf/

应该有帮助.

还要检查 /home/adonis/.IntelliJIdea12/system/tomcat/ 是否具有正确的权限和所有者.可能是它是由其他用户创建的,而您当前的用户没有写入权限.

Also check that /home/adonis/.IntelliJIdea12/system/tomcat/ has correct permissions and owner. Could be that it was created from a different user and your current user doesn't have the rights to write into it.

如果没有帮助,请从 .tar.gz 文件下载并解压新的 Tomcat 安装,将 IDEA 配置为使用此安装.

If it doesn't help, download and unpack a new Tomcat installation from .tar.gz file, configure IDEA to use this installation instead.

请注意,在某些 Linux 系统上使用包管理器安装的 Tomcat 具有非标准的布局和权限,因此不适用于 IDEA.

Note that Tomcat installed using the package manager on some Linux systems has non-standard layout and permissions, and therefore will not work with IDEA.

这篇关于IntelliJ需要将tomcat/conf目录复制到项目目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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