随笔 - 612, 文章 - 0, 评论 - 31, 阅读 - 74万

导航

< 2025年3月 >
23 24 25 26 27 28 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31 1 2 3 4 5

随笔分类 -  开源项目 - OSGi

摘要:这里仅限OSGi注册的Servlet,WebServer里面应该有所不同。http.registerServlet("/control/main", new ControlServlet(), null, null);http://localhost/control/mainServletPath=/control/mainContextPath=RequestURI=/control/mainRequestURL=http://localhost/control/mainPathInfo=nullhttp://localhost/control/main/ServletP 阅读全文

posted @ 2014-04-04 11:36 eastson 阅读(222) 评论(0) 推荐(0) 编辑

摘要:方法一:实现ServiceListener接口:package org.riawork.demo.web;import org.osgi.framework.BundleActivator;import org.osgi.framework.BundleContext;import org.osgi.framework.ServiceEvent;import org.osgi.framework.ServiceListener;import org.osgi.framework.ServiceReference;import org.osgi.service.http.HttpService; 阅读全文

posted @ 2014-03-26 09:39 eastson 阅读(541) 评论(1) 推荐(0) 编辑

摘要:将web容器置于OSGi框架下,其实就是将web容器做成OSGi支持的Bundle,再安装到OSGi框架中,这里使用的是Jetty容器。1、创建一个Eclipse插件项目,在此插件下创建一个WebRoot文件夹,里面创建两个文件夹一个是images,一个是pages,里面分别放置一个图片文件,一个简单的html页面和一个简单的jsp文件。大致目录结构如下图所示:2. index.jsp文件的内容如下: Insert title here 3、MANIFEST.MF文件的内容如下:Manifest-Version: 1.0Bundle-Manifest... 阅读全文

posted @ 2014-03-21 15:27 eastson 阅读(540) 评论(0) 推荐(0) 编辑

摘要:这里是指用Eclipse调试Felix Framework自身。1. 首先安装Eclipse Java EE,然后再安装Java Source Attacher,这样才会在Jar文件的右键菜单“属性”中有“Java Source Attachement”选项。2. 下载Felix FrameworkDistribution,注意这里是二进制版本,也就是直接可以执行的版本,不是源码。3. 使用SVN客户端工具下载Felix的源码http://svn.apache.org/repos/asf/felix/releases,注意版本号要对应。需要下载的有这样几项:org.apache.felix.f 阅读全文

posted @ 2014-03-19 15:08 eastson 阅读(791) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示