OSGI嵌入tomcat应用服务器(gem-web)——tomcat插件环境搭建

相关的资源下载,参考:https://www.cnblogs.com/dyh004/p/10642769.html

 

  • 新建普通的plugin工程

 

 

 

 

  • 新建工程运行环境

 

在工程中,新建运行环境

 

 

 

新建存放运行环境的依赖包目录

 

 

添加运行环境相关的依赖包

1、把OSGI嵌入tomcat应用服务器(gem-web)——t资源下载(https://www.cnblogs.com/dyh004/p/10642769.html)章节下载的the Equinox Console放入plugins目录下

 

把OSGI嵌入tomcat应用服务器(gem-web)——t资源下载(https://www.cnblogs.com/dyh004/p/10642769.html)章节下载的gemini.web相关的包及依赖包,放入plugins目录下

至此,所有相关的包都存放完毕

 

配置target

 

 

 

 

  • 新建WEB工程

 

 

 

配置生成相关的web文件

 

 

 

 

这样,对应的web目录结构就生成了

 

修改MANIFEST.MF文件

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: UMP Manager web Console
Bundle-SymbolicName: com.kszsa.console
Bundle-Version: 1.0.0.qualifier
Bundle-Vendor: KSZSA
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Bundle-ClassPath: WEB-INF/classes
Web-ContextPath: /web-console

 

在webapp下,新建index.html

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>首页</title>
</head>
<body>
这是首页
</body>
</html>

导出对应的war,并放入com.kszsa.target工程下的server目录下的plugins目录

 

 

刷新下plugins,重新设置下target

 

 

 

  • 配置运行环境

 

运行之后,控制台输出

 

访问界面,查看结果,地址:http://127.0.0.1:8080/web-console/index.html

 

 

至此,Gem-web环境搭建完毕。

 

posted @ 2019-04-02 17:10  kszsa  阅读(654)  评论(0编辑  收藏  举报