Portletfilter to change locale?
the ServletResponse provides a setLocale() method to 开发者_StackOverflowmodify 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?
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.
精彩评论