Friday, July 31, 2009

Running Apache Tomcat from inside Eclipse

You can run Apache Tomcat from inside Eclipse by:
* Window--> Show View --> Server

In the Servers panel that opens up:
* R-click --> New --> Server
* Select the Apache Tomcat Server from List
* Add your WebApp Project

You can now Right Click on the Server and Start/Stop it from inside Eclipse.


Here is a Gotcha:
- The application is run directly from your src folder (i.e. the war file is not actually copied to the /webapps directory of the tomcat install!)
- This is great because it speeds up development - you do not have to keep building the project to test it out on the server

- But REMEMBER to make a copy of all the jar files in the src/WEB-INF/lib directory otherwise TomCat will not find them!

No comments:

Post a Comment