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

后端 未结 7 1528
走了就别回头了
走了就别回头了 2021-02-04 05:04

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

相关标签:
7条回答
  • 2021-02-04 05:51

    Make sure you are editing the files right beneath the tomcat server folder, not the ones beneath the config folder. Check the attached screenshot for the files I'm referring to.

    0 讨论(0)
  • 2021-02-04 05:54

    I had this problem too, and the solution worked (I don't have enough reputation points to vote up the answer).

    On a similar note, I had to make configuration changes to a port number and that also required me to delete and re-add my tomcat instance from STS (spring tool suite).

    0 讨论(0)
  • 2021-02-04 05:55

    On Eclipse, double click on Server to view properties.
    check "publish module contexts to separate XML files", and save it. Run Tomcat server. Eclipse will be create conf/[enginename]/[hostname]/[appname].xml without touching server.xml

    0 讨论(0)
  • 2021-02-04 05:55

    Clean Tomcat Work Directory & Republish the project.

    0 讨论(0)
  • 2021-02-04 05:56

    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)

    0 讨论(0)
  • 2021-02-04 05:58

    Make sure that the path in the server.xml is same as in the Web project Settings.

    To see the Web Project Settings: Right click on the project >> Properties >> Web Project Settings.

    Always give the project path over here. The path in server.xml will automatically updated.

    0 讨论(0)
提交回复
热议问题