You may also need to override HttpServletRequestWrapper.getHeaders so that it returns a non-empty Enumeration for the Accept-Language header. In other words, always make JSTL think that the client has supplied the header. JSTL should then use ServletRequest.getLocales for the list of preferred locales.
This works, thanks!
I guess the Jakarta implementation is violating the JSTL spec 1.1 then, which states at several places that ServletRequest.getLocales() is used for determining the browser-based locale setting (e.g. 8.2.1, 8.3.2, 9.3.3).
Also, my feeling is that it is bad to fake request headers.
I just had a look at the Jakarta source, and it makes clear why it is peeking directly at the request headers. This is because the authors want to work around the default locale mechanism that is included in ServletRequest.getLocales().
Maybe we should try to convince the community to make that default mechanism optional for the next Servlet spec revision, for example by having to declare the default in the web.xml if it is desired.
Regards,
Andreas
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
