将Jetty嵌入Eclipse RCP中 [英] Embed Jetty in Eclipse RCP

查看:106
本文介绍了将Jetty嵌入Eclipse RCP中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个RCP应用程序,我需要在其中监视http流量并将其显示给用户.为此,我需要使用Embeded Jetty作为透明代理.

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.

我尝试了所有操作,并遵循了教程但是事情就不起作用了.我得到构建异常. 我尝试将Jetty jar添加为外部依赖项,但仍然没有用.

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.

非常感谢您的帮助.还请让我知道是否还有其他方法可以在不使用码头的情况下实现这一目标. (我尝试过Socks,但它与RCP UI线程冲突) 谢谢.

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.

推荐答案

广义上讲,您需要研究制作eclipse插件以及如何在eclipse插件项目中声明依赖项.您基本上想做的是仅在插件上下文中根据我们的码头嵌入式示例编写一些代码,因此,当您的插件加载时,它将触发码头服务器的启动.您将把码头依赖项作为osgi捆绑包装载.请注意,在默认情况下,在juno中,很多码头8.1.3都是可用的.

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.

这不是世界上最好的示例,但是您可以查看我们硬朗的wtp插件以获取一些想法,至少可以了解如何使用tycho以及一些组织机构来配置事物.

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/

这篇关于将Jetty嵌入Eclipse RCP中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆