Saturday 13 August 2011

Tomcat eclipse integration

Now we need to add the tomcat server to eclipse:
A good blog post about this is here
First we need to make sure that the server tab is showing in eclipse. Select 
eclipse -> window-> show view-> servers or window-> show view-> other -> find the servers.
Now in the server view right click and select new server.
Select the Apache tomcat 7 server.

Using the default settings above should be fine.
In the next step you need to tell eclipse where Apache is installed to. Under Tomcat installation directory click "Browse.." and navigate to the directory you installed tomcat. For me it was
           

Now click next. Now we can tell tomcat what resources to run. The resources is our rest application. So click the "rest" resource and select add, then click finish.



To test right click on the server and select start.
If you get an error saying the port 8080 is already in use you need to make sure that the tomcat service isn't running. To stop the service run administrative tools from the start menu then select services. Find the Apache Tomcat service and stop it. Also set it to manual start-up, since this is your dev machine you don't need it to always be running. Eclipse will launch it, when you start debugging your project.

No comments:

Post a Comment