Websphere PUMA SPI (PumaLocator) 如何与 ICEfaces Portlet 一起使用?

发布于 2024-10-20 19:35:27 字数 586 浏览 8 评论 0原文

症状:
PumaLocator 无法使用,每个 findXXX 方法都会返回空结果或抛出异常,因为没有找到任何内容。

分析:
问题似乎是,由于 ICEfaces 特定的体系结构,方法 GenericPortlet.doView 仅在第一次加载 Portlet 时调用,而不是在以下 (AJAX) 页面更新时调用,例如,以防万一称为 ActionListener 的。
如果我在 doView 方法中使用 PumaLocator ,一切都会正常。

我尝试了以下尝试:

  • doView中获取PumaLocator,将其放入Session中并稍后使用它 - 不起作用
  • 获取RenderRequestdoView 中,将其放入 Session 中,稍后使用它通过传递该请求来获取 PumaLocator - 不起作用,

我会很高兴得到任何提示。谢谢你!

Symptoms:
PumaLocator is unusable, every findXXX-method returns empty results or throws an exception because nothing was found.

Analysis:
The problem seems that, due to the ICEfaces specific architecture, the method GenericPortlet.doView is invoked only for the first time the Portlet is loaded, and not for the following (AJAX) page updates, e.g. in case of a called ActionListener.
If I use PumaLocator inside the doView-method, everything works fine.

I tried the following attempts yet:

  • Get the PumaLocator in doView, put it into Session and use it later - didn't work
  • Get the RenderRequest in doView, put it into Session and use it later to get a PumaLocator by passing that request - didn't work

I would be very glad to have any hints. Thank you!

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

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

发布评论

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

评论(1

何处潇湘 2024-10-27 19:35:27

PUMA 使用上下文中找到的信息来检查结果的授权。您必须在 ICEFaces 使用的 AJAX 后端 servlet 的部署描述符中添加 JavaEE 安全角色。根据经验,如果 request.getRemoteUser() 和 request.getUserPrincipal() 返回除 null 之外的内容,您就知道 PUMA 可以工作。否则它将无法工作,这是预期的行为。

或者,您可以尝试像这样禁用 PUMA 的安全检查。

PUMA checks the authorization for results by using information found in the Context. You must add JavaEE security roles in the deployment descriptor for the AJAX backend servlets the ICEFaces uses. As a thumb of rule if request.getRemoteUser() and request.getUserPrincipal() return something besides null you know PUMA will work. Otherwise it will NOT work and that is intended behaviour.

Alternatively you can attempt to disable the security checks of PUMA like this.

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