开发者

Creating a Spring MVC project in Eclipse 3.5

HIi, I try to figur开发者_如何转开发e 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:

  • Eclipse shows a folder with "JS" as icon, but when I open it it shows the "src" and "target" folder, also with JS icon... What is that?
  • is there a way to "click a button" in Eclipse an compile the project AND have it auto-deployed to my local/remote web server?

THX


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜