转载一篇关于JetSpeed2.0的文章:Jetspeed2/DevelopersDocumentation/DeployingCustomPortlets

本文介绍了在Jetspeed 2中部署自定义portlet的方法。portlet类似servlet,需部署描述符portlet.xml并打包成war格式。还说明了部署、重新部署和取消部署的步骤,如部署时将war文件复制到指定目录等,也可借助PALM管理portlet应用。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

Deploying custom portlets in Jetspeed 2 is simple. Portlets are very similar to servlets. They require a deployment descriptor, portlet.xml which goes in WEB-INF and need to be packaged in a war-like format. You can find quite a few example portlet.xml files within the Jetspeed 2 source tree. For starters take a look at the one under /portal/src/webapp/WEB-INF.

Deployment

Quick steps to deploying your portlet.

  1. Build you portlet as a portlet application just as you would a web application.

  2. Package your portlet application into a .war file.

  3. Copy the .war file to Jetspeed's deployment directory, by default this is WEB-INF/deploy. Jetspeed will take care of automatically deplying the portlet into the portlet registry and will also deploy the portlet as a web application into the app server Jetspeed is deployed to.

  4. The easiest way to view your portlet is to add an entry to the default-page.psml under jetspeed/WEB-INF/pages. The id for the portlet fragment uses a unique combination of ${portlet.application.id}::${portlet.name} where ${portlet.application.id} is the actual name of the war file (minus the ".war") that contains your portlet app and ${portlet.name} needs to be the value in the portlet name tags, <portlet-name>MyPortlet</portlet-name>. Changes to the psml will be picked up automatically and you should now be able to view your portlet!

Redeployment

Just copy a newer version of the same war to WEB-INF/deploy, Jetspeed will take care of the rest. Redeployment preserves all portlet preferences.

Undeployment

To undeploy you portlet application, follow the same steps you would to undeploy a web application from your app server. A listener will notify Jetspeed to remove the portlet application from its internal registry.

NOTE:

You can use the Portlet Application Lifecycle Manager (PALM) in the administration portion of Jetspeed to undeploy, stop and restart portlet applications.

identity 身份认证 购VIP最低享 7 折! triangle vip 30元优惠券将在58:6:9后过期 去使用 triangle QT+Poppler+PDFviewer.zip 是一个用于在Windows操作系统下,使用QT5框架结合Poppler库开发PDF阅读器的项目。这个项目的核心是利用Poppler库解析PDF文档,并通过QT5进行用户界面的设计和交互。以下将详细介绍相关知识点: 1. **QT5框架**:QT(Qt)是一个跨平台的应用程序开发框架,支持多种操作系统,如Windows、Linux、macOS等。它提供了丰富的库函数和组件,使得开发者可以方便地构建图形用户界面(GUI)应用程序。QT5是QT的第五个主要版本,引入了许多新特性和改进,如QML(Qt Meta Object Language)用于声明式UI设计,以及更好的性能和API优化。 2. **Poppler库**:Poppler是一个开源的PDF文档处理库,源自Xpdf项目,主要用于PDF文件的解析、渲染和提取文本。Poppler提供了C++接口,使得开发者能够方便地在应用程序中集成PDF阅读和处理功能。它可以读取PDF文件,显示页面,提取文本和元数据,甚至支持对PDF文件进行注释和修改(但本项目可能仅涉及阅读功能)。 3. **PDF viewer的实现**:在本项目中,PDF viewer是基于QT5 GUI组件构建的,它利用Poppler库来加载和解析PDF文档。`mainwindow.cpp`和`mainwindow.h`包含了主窗口类的定义和实现,这是用户与应用程序交互的主要界面。`pdfcanvas.cpp`和`pdfcanvas.h`则可能包含了用于显示PDF页面的自定义画布类,该类使用Poppler库来渲染PDF页面到QT的画布上。 4. **项目构建与编译**:`newtime.pro`是QT项目的配置文件,用于指定项目依赖的库(如Poppler)、源代码文件、编译选项等。`.pro.user`文件则保存了用户的特定编译设置,如编译器路径或调试选项。开发者需要使用QT的qmake工具或直接在IDE如Qt Creator中打开此项目,进行编译和链接,确保所有依赖库都正确安装并链接。 5. **文件操作**:`main.cpp`通常是程序的入口点,负责初始化QT应用环境并运行主循环。在PDF viewer中,可能会在`main.cpp`中实例化主窗口,并调用Poppler库的相关函数来加载PDF文件。 6. **使用流程**:用户可以通过QT界面选择PDF文件,然后通过Poppler库读取文件内容,将页面渲染到QT的控件上。用户可以通过滚动、缩放等操作查看PDF内容。 Poppler库的强大功能使得PDF viewer可以支持多页显示、文本搜索、书签管理等高级特性。 7. **优化与扩展**:为了提升用户体验,开发者可能会对PDF viewer进行各种优化,比如添加平滑滚动、快速查找、页面预加载等功能。此外,还可以考虑支持批注、打印、PDF转换等更复杂的操作,以增强软件的功能性和实用性。 QT+Poppler+PDFviewer.zip项目提供了一个基础的PDF阅读器实现,开发者可以在此基础上进一步定制和扩展,以满足特定的PDF处理需求。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值