SpringSource Tool Suite (STS): How to run server and Java project through the IDE?

Dave picture Dave · Mar 16, 2011 · Viewed 42.9k times · Source

I'm using the latest version of SpringSource Tool Suite (STS). I have set up a Java project. My code has an Ant build file that packages a WAR. I have Tomcat 6.0.24 installed locally on my Mac 10.6.3. Can someone point me to how I deploy my project onto the server from the IDE and as such, set up debugging with breakpoints?

Thanks, - Dave

Answer

Andrew Eisenberg picture Andrew Eisenberg · Mar 29, 2011

Here is what you need to do:

  1. Open up the servers view inside of STS.
  2. Create a new Tomcat instance, and point it to your locally installed Tomcat. (Alternatively, you can use the pre-installed tcServer instance, which is essentially Tomcat with a few extra things like Spring Insight).
  3. Right-click on your project and select Configure -> Convert to Faceted Form...
  4. In the dialog that comes up, choose Dynamic Web Module
  5. Now, you should be able to drag and drop your project onto the server instance.
  6. After that, right-click on the server instance and select "Debug"

You can find more detailed instructions here: http://www.ibm.com/developerworks/library/os-eclipse-tomcat/index.html