I am having some trouble getting Spring and Tomcat up and running and recognized by eclipse. I have looked around on google with no luck. Specifically, I am having trouble having eclipse recognize tomcat (I am running linux, and when I browse to the relevant jar file in the runtime environments configuration, eclipse wont allow me to select it). Could somebody please point me to (or describe here) how to get Spring and Tomcat working properly in eclipse and possible provide a "Hello World" example so I can test my first Spring application? Thank you very much.
A:
Not familiar with Spring, but here's a link that helped me get Tomcat up and running in Eclipse:
Chris Persichetti
2009-12-18 18:01:06
A:
you can try eclipse web tools platform for doing this.
You can go to your project then choose
Debug As --> Debug On Server
I think the server adapter for tomcat is installed by default.
You can download the JEE Distribution Of Eclipse to have this functionality out of the box.
grassbl8d
2009-12-18 18:04:15
+2
A:
- You must have WTP (Web Tools Platform). It is bundled in the JEE version of Eclipse
- Go to
Window -> Preferences -> Server -> Runtime environment
and click "add" - Choose and setup your server following the wizard
- When finished, Go to
Window > Show view > Other
and locateServers
- It will appear in the bottom panel. Now you can double-click it to set some options of your preference
Right click your project > Debug > Debug on server
(The project must be a "web project")
It's generally this. There might be some troubles in the last step, but use google or the link given by Chris for that.
Bozho
2009-12-18 18:07:01
I was having problems with your step (3). I am running linux and when I browse to the jar file that it indicates, it won't allow me to select it...
Tms
2009-12-18 18:50:42
More specifically...it asks me to locate my tomcat 6 installation directory. Perhaps I am just giving it the wrong location (/usr/share/tomcat6..). I am running Ubuntu.
Tms
2009-12-18 18:53:30
Make sure you are selecting the tomcat directory not a jar... also eclipse will log errors in more detail in the Error Log View ( Window > Show View > Error Log) or you can go into your Eclipse workspace directory and find the actual log file... it might give more explanation about what is failing.
cjstehno
2009-12-18 19:22:51
/usr/share/tomcat6 should be OK, in case you have the right permissions
Bozho
2009-12-18 19:28:56
+1
A:
Have a look at the Spring Tools Suite - essentially Eclipse with Spring specific extensions.
Chris Harcourt
2009-12-19 01:53:36