Setting up Spring and Tomcat in eclipse?
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开发者_如何学Go possible provide a "Hello World" example so I can test my first Spring application? Thank you very much.
Have a look at the Spring Tools Suite - essentially Eclipse with Spring specific extensions.
- You must have WTP (Web Tools Platform). It is bundled in the Java EE 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.
Not familiar with Spring, but here's a link that helped me get Tomcat up and running in Eclipse:
http://www.windofkeltia.com/j2ee/wtp-tutorial.html
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 Java EE Distribution Of Eclipse to have this functionality out of the box.
精彩评论