-
1. Re: Forcing locale
je.a.le Jun 2, 2008 8:11 AM (in response to jvence)I'm pushing this "old" thread back on top because i'm having the same problem.
I would like to offer users the posibility to choose language not only throw brower language setting (request.getLocale() ) but also throw an interface (js/jsp etc...)
For my datas, I can walk around with session. The problem is jbossportal (window, menu, etc..).
how could i inform jossportal to use a locale for a specific session (anomymous ) ???
Is there a servlet/filter/even listener I could use ??? mbean ?
thks -
2. Re: Forcing locale
je.a.le Jun 3, 2008 10:21 AM (in response to jvence)I managed to inject/force a custorm local by adding a new mbean (ServerInterceptor) into JBossInterceptorStackFactory (jboss-service.xml)
My problem now is i'm unable to retrive any session attribure passed from a servlet into the HttpSession. On the servlet side, no pb, can read attribute back.
The only solution I found is to use PortalSession... with portlet. i strongly prefer servlet :-)
I tried also from a jsp/scriptlet into portal-core without success.
What I set into those servlets is valid, but cannot been read back from the interceptor.
Any clue ???
Doesn't look to be an issue but just in case, my jboss-service.xml changes :<mbean code="org.jboss.portal.core.aspects.server.ACLocaleInterceptor" name="portal:service=Interceptor,type=Server,name=ACLocale" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> </mbean> <mbean code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory" name="portal:service=InterceptorStackFactory,type=Server" xmbean-dd="" xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean"> <xmbean/> <depends-list optional-attribute-name="InterceptorNames"> <depends-list-element>portal:service=Interceptor,type=Server,name=SessionLock</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=Transaction</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=UserEvent</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=SessionInvalidator</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=User</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=ACLocale</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=Locale</depends-list-element> <depends-list-element>portal:service=Interceptor,type=Server,name=ContentType</depends-list-element> </depends-list> </mbean>
THKS