Hi, I created a new web project using eclipse. I put in it a simple html file, and tried to run it.
I selected the "run on server" option.
I was asked to choose the web server I want to use.
I was asked to choose: "tomcat server v6.0 at local host" - "STOPPED",
or to "manually define a new server".
Because my tomcat in signed as "stopped" (I don't know how, since it is running),
I chose the second choice: "manually define...", and "defined" my server, by choosing
manually from the list: tomcat 6.
I got an error of:
Several ports (8080, 8009) required by Tomcat v6.0 Server at localhost
are already in use. The server may already be running in another process,
or a system process may be using the port. To start this server you will need
to stop the other process or change the port number(s).
my tomcat is running on : localhost:8080
port 8009 in avalable. I know it since I did: netstat -an , and saw that 8009 is listening.
Eclipse will want to start its own instance of the server. If you have the server running stand-alone (outside of Eclipse) these won't mix well.
Joined: Nov 10, 2009
Thanks for your reply.
I stopped the tomcat, so 8080 is now available,
and I succeeded running a web app inside eclipse.
But what is this internal tomcat ? I don't have to have
my tomcat thow. Am I right ?
It is actually saving me the export war file, doesn't it ?
Mark E Hansen
Joined: Apr 01, 2009
I'm glad to hear that you got it working.
Tomcat is an application server. You can start it yourself, using the scripts provided by the software, or you can have Eclipse start it for you. In either case, you're starting the same server (unless you've taken steps to start different servers in each case, which I don't know if Tomcat supports - as I don't use Tomcat).
Eclipse is using the version of Tomcat that you installed on your machine. If you recall, when you created your web application and indicated the runtime environment would be Tomcat, you had to tell Eclipse where you installed it.
Running the application from within Eclipse can be very handy for development and debugging, but you wouldn't want your production application to run that way. Some application servers allow you to deploy an application in exploded format (not in a .War file) - I don't know if they all do this. I would think that by the time you're ready to deploy your application to your production environment, you're going to want to create a .War file to deploy.