是否可以在 Websphere Portal 上调试 portlet?

发布于 2024-10-28 11:00:39 字数 373 浏览 9 评论 0原文

我正在使用Rational Application Developer 来开发JSR168 portlet 并将它们部署到Websphere Portal 6.1。现在我想调试它们。

我想要做的是这个工作流程:

  1. 开发 portlet 并设置断点
  2. 在调试模式下启动 Portal
  3. 使用 RAD 中的鼠标右键上下文菜单部署 portlet
  4. 打开门户,创建页面,放置 portlet
  5. 启动应该让我执行的操作到断点
  6. 使用 RAD 中的调试视角进行调试

是否可能并且有教程吗?

I'm using Rational Application Developer to develop JSR168 portlets and deploy them to Websphere Portal 6.1. Now I want to debug them.

What I want to do is this workflow:

  1. Develop the portlet and set a breakpoint
  2. Start Portal in debug mode
  3. Deploy the portlet using the right mouse button context menu in RAD
  4. Open portal, create a page, place the portlet
  5. Start the action that should get me to the breakpoint
  6. Use the debug perspective in RAD to debug

Is it possible and is there a tutorial out there?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

青柠芒果 2024-11-04 11:00:39

当使用 Rational Software Developer 或 Architect 时,您需要时常清理门户和应用程序服务器的 Websphere 临时目录。每当有异常情况时,请清洁它们。

您的工作空间可能是另一个问题。如果干净的临时目录对我不起作用,我会创建一个新的工作区。为了减少每个新工作区的配置任务,我进行了基本设置并将其检查到 subversion 或 GIT。

when using Rational Software Developer or Architect you need to clean the Websphere temp directories from time to time, both for portal and application server. Whenever something is strange, clean them.

Your workspace can be another problem. If clean temp directories doesn't work for me I create a new workspace. To reduce the configuration tasks for every new workspace I make a basic setup and chekc this in to subversion or GIT.

晒暮凉 2024-11-04 11:00:39

在本地开发计算机上设置门户服务器的过程非常简单。我一开始没有找到设置信息,但可以在 IBM 网站上找到这些信息,网址为 https://www-304.ibm.com/support/docview.wss?uid=swg21330952(适用于 Portal 6.1)。

安装花了我几个小时,但之后您可以在 Rational 中添加 Portal Application Developer 并启动它。在旧机器上,速度慢得令人痛苦,而且您确实需要 4GB RAM 来日常使用。

如果 Portal 正在运行,请右键单击您的 portlet 项目并从上下文菜单中选择部署 portlet...。将部署 portlet。

我必须检查 @Nachtfrost 正确地清理了临时目录 以重新启用右键单击部署。

如果右键单击部署对您不起作用,请尝试以下方法:(这将不允许您调试您的 portlet!它只是作为运行它们的解决方法

  1. 将您的 portlet 导出为 WAR (右键单击项目,从上下文菜单中选择导出...
  2. 服务器视图中右键单击门户,然后从打开门户中选择打开门户上下文菜单
  3. 以管理员身份登录,转到“管理”
  4. 转到 Web 应用程序菜单(我是凭记忆写的,因此请尝试在 Portlet 管理菜单周围的某个位置找到该菜单)
  5. 从WAR 文件,就像任何其他 Web 应用程序一样
  6. 创建一个新页面,将您的 portlet 放在该页面上

The process of setting up a portal server on your local development machine is pretty straight forward. I didn't find the setup information at first, but they're available on IBMs website at https://www-304.ibm.com/support/docview.wss?uid=swg21330952 for Portal 6.1.

The installation took me a couple of hours, but after that you can add Portal in your Rational Application Developer and start it. That's painfully slow on an older machine, and you really want to have 4GB RAM for using it daily.

If Portal is running, right-click your portlet project and choose Deploy portlet... from the context menu. The portlet will be deployed.

I have to check, if @Nachtfrost is right with the cleanup of temp directories to re-enable the right-click deployment.

If right-click deployment does not work for you, try this approach: (this will not allow you to debug your portlets! It's only meant as a workaround to run them at all)

  1. Export your portlet as WAR (right-click the project, choose Export... from context menu
  2. Right-click Portal in your Servers view and choose Open Portal from the context menu
  3. Log in as admin, go to Administration
  4. Go to the web applications menu (I'm writing this from memory, so try to find the menu somewhere around the Portlet administration menu)
  5. Install your portlet from the WAR file, like any other web app
  6. Create a new page, place your portlet on that page
狠疯拽 2024-11-04 11:00:39

我有一个习惯,即通过主机文件为我的开发门户服务器提供真实的 DNS 名称,但让它从 DHCP 服务器获取 IP 地址。几周过去了,DHCP 分发了一个新地址 - 此时 Rational 中的 portlet 调试将无法工作。即使服务器在 Rational 中配置为 localhost,情况也是如此。

如果 portlet 调试工作正常但现已停止,请确保您的 DNS 到 IP 有效。

I have a bad habit of giving my dev portal server a real DNS name via a hosts file, but letting it pick up the IP address from a DHCP server. Weeks go by, and DHCP hands out a new address - at which time portlet Debugging in Rational will not work. This is true even if the Server is configured for localhost in Rational.

If portlet debugging was working and has now stopped, make sure your DNS to IP is valid.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文