OSGI嵌入tomcat應用服務器(gem-web)——tomcat插件環境搭建
阿新 • • 發佈:2019-04-02
version code end har java 服務 文件 charset pat
相關的資源下載,參考: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環境搭建完畢。
OSGI嵌入tomcat應用服務器(gem-web)——tomcat插件環境搭建