Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个带有 JSR 168 规范的 portlet,它曾经在 UPortal(一些旧的基于门户的 java 框架)中运行。但是,我需要将此 portlet 从门户中移除,并将其作为一个独立的应用程序。现在我的问题是现有代码是否有任何方法,或者是否需要创建一个新的 web 应用程序?(obv 我确信我可以重用一些旧代码,但只能重用一些)
Portlets被管理在 Portlet 容器内,不能部署在简单的 Servlet 容器上,而作为一组路由的 web 应用程序Servlets只需要一个 Servlet 容器(除非您将发送Entreprise Beans)
Portlets
Servlets
所以你猜对了,会有一些部分需要重写,例如 Web 应用程序部署描述符 ( web.xml )、页面处理、样式......但是如果你已经设法为你的 portlet 应用程序建立了一个坚实的基础设计,我想你会能够保留您源的几乎主要部分,因为它们将位于不同的层中。