Running jetty from eclipse

南笙酒味 提交于 2020-01-13 10:14:45

问题


Please let me know how can I configure jetty server to run from eclipse IDE? Also, suggest me some good plugins for the same. I downloaded jetty launcher but not able create new configuration with it. Please help.


回答1:


The best way I found to run Jetty from eclipse (and debug, etc.) was this : http://neelzone.wordpress.com/2007/06/18/jetty-and-eclipse-integration/

Basically, you create a java project, put jetty's code in it, create a context file in jetty/contexts that points to your web application, and Run as Java application.

No need for a plugin.




回答2:


With Eclipse Kepler, I found two plugins, "Eclipse Jetty" and "Run Jetty Run" in the market place.

I tried "Run Jetty Run" first but couldn't make it work (css file didn't load), but with "Eclipse Jetty", it worked out of the box for my project.




回答3:


I have followed the below steps to set up Jetty server in my eclipse:

(1) Download the 'net.sourceforge.eclipsejetty.launcher' jar (plugin) from the below URL: http://sourceforge.net/projects/eclipse-jetty/

(2) Copy the downloaded jar file to your eclipse 'plugins' folder (Example: C:\eclipse-jee-luna\plugins)

(3) Restart Eclipse

(4) Go to Eclipse Workspace -> Right click on your web project -> Run -> Run Configurations > Jetty Web App > Set the 'WebApp Directory' > Click on Run

After following the above steps, I am able to successfully deploy & run my web project using Jetty Server in Eclipse.

I hope this is helpful and easy to set up.



来源:https://stackoverflow.com/questions/3280979/running-jetty-from-eclipse

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!