Fóruns

Início » Liferay Portal » English » 3. Development

Visualização combinada Visão plana Exibição em árvore
Tópicos [ Anterior | Próximo ]
toggle
Roland Blochberger
HttpServletRequest attributes statically (threadlocal) available?
11 de Setembro de 2008 01:20
Resposta

Roland Blochberger

Ranking: New Member

Mensagens: 7

Data de entrada: 3 de Setembro de 2008

Mensagens recentes

Is there a way to obtain attributes from the HttpServletRequest (or PortletRequest) in a static way? I would need the request Locale outside the typical Struts/Servlet classes but inside their processing sequence. (see also Locale dependent view permission for pages
Roland Blochberger
RE: HttpServletRequest attributes statically (threadlocal) availa
12 de Setembro de 2008 00:15
Resposta

Roland Blochberger

Ranking: New Member

Mensagens: 7

Data de entrada: 3 de Setembro de 2008

Mensagens recentes

After a valuable hint from Stanislav Mores I could solve the problem by putting the user's selected Locale into a ThreadLocal Singleton. This is done in an Action class that is configured to run first in the list of servlet.service.events.pre. The methods of the extended PermissionChecker can obtain the Locale from the Singleton whenever it is needed.
Brian Scott Schupbach
RE: HttpServletRequest attributes statically (threadlocal) availa
12 de Junho de 2013 12:27
Resposta

Brian Scott Schupbach

Ranking: Expert

Mensagens: 331

Data de entrada: 23 de Outubro de 2008

Mensagens recentes

Hi Roland,

I'm attempting to do something similar. Could you provide any insights on how you did this? Any help you could provide would be much appreciated.

Thanks,

Brian