简体   繁体   中英

Eclipse with tomcat - eclipse modifies server.xml

I use tomcat with eclipse in 'Use tomcat installation' mode. My problem is, that eclipse overwrites tomcats server.xml every time, and deletes my crossContext="true" elements.

Should I use custom location? Or the eclipse setup is wrong?

Thanks!

You can edit the equivalent configuration files inside your "Server" project/folder in the eclipse workspace. Those are the configuration files with which eclipse is overwriting the ones found under your Tomcat installation.

I have experienced a lot of pain getting Eclipse to interact nicely with Tomcat. I recently switched over to Jetty and I will never go back! It's especially easy to use if you use Maven as your build manager. If you use Jetty for development, you can still use Tomcat for deployment.

If you want to preserve Tomcat artifacts then you can choose "Use Workspace Metadata" option. This option will copy all configuration files to "{workspace}/.metadata/.plugins/org.eclipse.wst.server.core" directory but still use the installed Tomcat Binaries for starting and stopping server. This is a neat way to have multiple server configs using a single tomcat.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM