Portletfilter 更改区域设置?

发布于 2024-08-12 11:18:55 字数 132 浏览 2 评论 0原文

ServletResponse 提供了 setLocale() 方法来修改尚未提交的响应的区域设置。 PortletResponse 不提供这样的方法,仅提供 getLocale() - 还有其他方法可以更改 portlet 请求/响应的区域设置吗?

the ServletResponse provides a setLocale() method to modify the locale of a response which is not commited yet. The PortletResponse doesn't provide such a method, only getLocale() - is there any other way to change the locale of a portlet request/response?

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

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

发布评论

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

评论(1

可可 2024-08-19 11:18:55

不。这在 portlet 中没有意义 - 它们只是聚合响应的一个组成部分。

Portlet 2.0 规范 (JSR 286) 证实了这一点:

Portlet 无法设置响应的字符编码或区域设置,因为它们是
由门户/portlet 容器预先设置。

No. This would not be meaningful in portlets - they are only a component of an aggregate response.

The Portlet 2.0 spec (JSR 286) confirms this:

The portlet cannot set the character encoding or the locale of the response as these are
pre-set by the portal / portlet container.

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