Anvar
Anvar

Reputation: 434

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!

Upvotes: 8

Views: 14639

Answers (3)

JPS
JPS

Reputation: 526

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.

Upvotes: 25

Vineet
Vineet

Reputation: 11

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.

Upvotes: 1

schmmd
schmmd

Reputation: 19448

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.

Upvotes: 1

Related Questions