Embed Jetty in Eclipse RCP

久未见 提交于 2019-12-10 11:49:23

问题


I am building a RCP application , where I need to monitor http traffic and show it to user. For that I require use of Embeded Jetty as transparent proxy.

I tried everything , followed this Tutorial But things just don't work. I get build exception. I tried adding Jetty jar as external dependency , but still no use.

Would appreciate any help. Also please let me know if there are any other ways of achieving this without use of jetty. (I tried Socks but it conflicts with RCP UI thread) Thank You.


回答1:


In broad terms you need to look into making eclipse plugins and how to declare dependencies in eclipse plugin projects. What you are basically looking to do is write a bit of code based on our jetty embedded examples only in a plugin context, so when your plugin loads it would trigger the starting of the jetty server. You will load the jetty dependencies as osgi bundles. Note that in juno much of jetty 8.1.3 will be available by default.

Its not the best example in the world, but you can look at our crusty wtp plugin for some ideas, at least on how you could configure things using tycho and maybe some organizational bits.

http://git.eclipse.org/c/jetty/org.eclipse.jetty.wtp.git/



来源:https://stackoverflow.com/questions/10809096/embed-jetty-in-eclipse-rcp

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