eclipsetomcattomcat6eclipse-3.6helios

When not to use this server location when using tomcat within Eclipse


When using tomcat within Eclipse why would I ever not want to use the tomcat installation as checked in the attached image. I always use the "Tomcat Installation" Are there advantages/disadvantages of using the other Tomcat server locations.

enter image description here


Solution

  • In fact, I always Use Workspace Metadata. When you say Use workspace metadata, Eclipse copies your files (class files, jsps, server.xml, context.xml) to /.metadata/.plugins/org.eclipse.wst.server.core/tmp0. It then starts Tomcat using these files. It does not change the Tomcat installation directory at all. Note that this doesn't copy the tomcat files, just the files which come from your project.

    If you choose Use Tomcat Installation, then it copies your files into the Tomcat installation directory, and boots it from there.

    If, like me, you're developing multiple projects from multiple workspaces, then this makes a big difference. With Use Workspace Metadata you will never get any interference between workspaces. For instance, it's possible that when rebooting Tomcat, one project will be in a bad state and your logs will be filled with stuff from another project. It's better to have two separate locations, and the workspace is a good place for this.