Pregunta

I am trying MyEclipse IDE and comparing it with Eclipse Java EE distro:

In eclipse I am able to create a Tomcat runtime and then create instance of that runtime. These instances can run on separate ports, have separate contexts, classpath etc.

I am able to create servers in MyEclipse, but I am not able to find a way to specify separate instances to run on separate ports, for example.

Here, it is suggested that Blue can do it. Does the default version of MyEclipse have some trick to achieve this as well?

Just so it is clear, I want to mention that editing the server config is an option, but comparing with how I do it in Eclipse, may not be the cleanest and most modular approach.

¿Fue útil?

Solución

This document describes how to run multiple instances (search for "Multiple Tomcat Instances").

You will need to configure the Tomcat 7 connector (not the builtin Tomcat connector), make sure you enable it. Then click the "Create Launch Configuration" button on the Launch page of the server connector configuration. On the configuration dialog, catalina.base can be defined on the Arguments tab, in the VM Arguments panel (there will already be a default definition there, that you can change). The deployment base folder can be defined on the Server tab. The catalina.base folder, as described in the linked document (as CATALINA_BASE), will have configuration files for Tomcat, so you should be able to define the port number there. Every launch configuration can be used as a server, by ensuring the "Add as server" checkbox is ticked on the Server tab of the configuration dialog. Name each configuration as you wish (presumably to include the port number).

I haven't actually tried this but I can't see why it wouldn't work.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top