Czar
Czar

Reputation: 366

Creating a Spring MVC project in Eclipse 3.5

HIi, I try to figure out the best way to set up a fully functionally Spring MVC project for use in Eclipse.

What I did so far:

  1. Create new project with "New Project > Spring > Spring Project"
  2. Try "maven package" command from Eclipse's "Run as" button > Error
  3. Compile projext on command line using "mvn package"
  4. Drag-drop to Tomcat webapps folder.

Now I try to figure out answers to these questions:

THX

Upvotes: 0

Views: 1347

Answers (1)

Ralph
Ralph

Reputation: 120761

For the second question:

If you have configured a Server in Eclipse (for example Tomcat), and added your Project to this Server, then it auto-deployes every change in your project to the server. (Sometimes this does not work 100% correct and you have to restart the server.)

If you need more functionality you can have a look at JRebel ( http://www.zeroturnaround.com/jrebel/ )

Added

If you Project is no Dynamic Web Project (this is if you create it as Spring Project), then you have to add the Dynamic Web Facet first.

  • Project Properties/Project Facets/-> Convert to faceted from.../
  • Select: Dynamic Web Project, and Java

Then you can add the project to your server.

Upvotes: 2

Related Questions