每次运行项目时,Eclipse都会修改server.xml(运行->在服务器上运行) [英] Eclipse modifies server.xml each time run the project (Run-->Run on Server)

查看:257
本文介绍了每次运行项目时,Eclipse都会修改server.xml(运行->在服务器上运行)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Eclipse Juno上使用Tomcat 7.我将工作区元数据用作服务器位置(请在下面查看我的tomcat配置).

I'm using Tomcat 7 on Eclipse Juno. I use workspace metadata as server location (Please see my tomcat configurations below).

我也在eclipse中获得了一个服务器项目 [请参见下图],其中包含单独的server.xml和其他配置文件.

Also I got a Server project in eclipse [please see the image below] with separate server.xml and other configuration files.

通常正常.在我更改了SSL配置的server.xml(在eclipse项目中)后,就遇到了这个问题.

Normally it works fine. The issue came across after I changed the server.xml (in eclipse project) for SSL configurations.

配置工作正常.但是每次我运行项目(运行->在服务器上运行)时,server.xml都会被修改为默认版本.我的自定义SSL更改丢失.

Configurations are working fine. But each time I run the project (Run-->Run on Server) server.xml get modified to the default version. My customized SSL changes are missing.

我也尝试在tomcat的安装位置(C:\ apache-tomcat-7.0.35 \ conf)中更改server.xml,但是它没有从eclipse中获取.

Also I tried to change server.xml in tomcat installation location (C:\apache-tomcat-7.0.35\conf), but it didn't pick from eclipse.

有人可以帮我吗?

谢谢

推荐答案

我找到了适用的解决方案,但不是完美的解决方案.

I found an applicable solution but not a perfect one.

我所做的是;

1.在安装位置更改了server.xml文件(在我的情况下为C:\ apache-tomcat-7.0.35 \ conf)

1.Changed server.xml file in installation location (In my case C:\apache-tomcat-7.0.35\conf)

2.从eclipse服务器面板中删除tomcat服务器(请参见下图)

2.Remove tomcat server from eclipse server panel (please see the image below)

3.在Eclipse服务器面板中创建一个新服务器.

3.Create a new server in eclipse server panel.

4.然后,服务器项目将根据我的自定义更改生成新的server.xml.

4.Then Server project will be generated new server.xml with my customized changes.

5.诀窍是,最初,eclipse在面板中创建新服务器时会从安装位置选择server.xml.

5.The trick is, initially eclipse picks server.xml from installation location when create a new server in panel.

谢谢

这篇关于每次运行项目时,Eclipse都会修改server.xml(运行->在服务器上运行)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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