Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse modifies server.xml each time run the project (Run-->Run on Server)

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

Tomcat configurations

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

Server project

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

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.

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.

Can anyone please help me on this?

Thanks

like image 889
Unknown Avatar asked Mar 05 '13 20:03

Unknown


2 Answers

In {workspace}/Servers you will find a folder for every Tomcat configuration, containing several configuration files, including the server.xml. There you then can edit the file directly.

To get changes taken into account restart Eclipse. That is imho better than removing and adding the configuration back all the time. Tested using Eclipse Mars and Tomcat 7.

(the solution is from: Eclipse with tomcat - eclipse modifies server.xml)

like image 116
Exocom Avatar answered Oct 02 '22 14:10

Exocom


I found an applicable solution but not a perfect one.

What I have done is;

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

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

3.Create a new server in eclipse server panel.

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

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

Thanks

eclipse server panel

like image 23
Unknown Avatar answered Oct 02 '22 15:10

Unknown