[Hippo-cms7-user] How can I set the acceptlanguage?

Mickaël Tricot m.tricot at onehippo.com
Wed Oct 19 14:38:24 CEST 2011


Hi Damien,

Jasper is true. But also there was a bug in HST which is fixed since 
version 2.22.03. See https://issues.onehippo.com/browse/HSTTWO-1665

In case your are using an older version (< 2.22), you can fix it by 
setting the following attribute to the request context:

import javax.servlet.jsp.jstl.core.Config;
request.getRequestContext().setAttribute(Config.FMT_LOCALE + 
Config.REQUEST_SCOPE_SUFFIX, locale);

I am not 100% sure about the scope suffix though.

Cheers,
Mickaël

On 10/19/2011 01:39 PM, Jasper de Vries wrote:
> You can set the hst:locale attribute on your host.
>
> Kind regards,
> Jasper
>
> On 19-10-2011 13:33, Pritt wrote:
>> Hi,
>>
>> I am trying to format a Date in jsp:
>>
>> <fmt:formatDate pattern="yyyy-MM-dd hh:mm:ss" value="${now}"/>
>>
>> Sometimes the jsp do not format my date. I found out, that it is 
>> because of
>> the acceprlanguage. Can I set the acceptlanguage by default somewhere?
>>
>> Regards,
>>  Damien



More information about the Hippo-cms7-user mailing list