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

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

问题描述

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

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 base是 / 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:

运行Tomcat时出错:复制配置文件时出错从/ var / lib / tomcat7 / conf到/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天全站免登陆