You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Arieh Markel <Ar...@central.sun.com> on 2000/10/10 22:29:26 UTC
[tomcat_32] how to get Locale from Request
I am working on enhancing the StaticInterceptor in the following manner:
a. offer file-based localization lookup
a request for /[path]/index.html will try to serve first
/docRoot/[path]/index_<req_language>_<req_country>_<req_variant>.html
/docRoot/[path]/index_<req_language>_<req_country>.html
/docRoot/[path]/index_<req_language>.html
/docRoot/[path]/index_<def_language>_<def_country>_<def_variant>.html
/docRoot/[path]/index_<def_language>_<def_country>.html
/docRoot/[path]/index_<def_language>.html
/docRoot/[path]/index.html
b. offer docRoot-based localization lookup
a request for /[path]/index.html will try to serve first
/docRoot/<req_language>_<req_country>_<req_variant>/[path]/index.html
/docRoot/<req_language>_<req_country>/[path]/index.html
/docRoot/<req_language>/[path]/index.html
/docRoot/<def_language>_<def_country>_<def_variant>/[path]/index.html
/docRoot/<def_language>_<def_country>/[path]/index.html
/docRoot/<def_language>/[path]/index.html
/docRoot/[path]/index.html
I have the code to perform the lookups in place.
What is missing to implement is access to the Locale from the Request
on requestMap() and on doService().
How can I get from the HttpServletRequest from the Request object ?
Thanks,
Arieh
--
Arieh Markel Sun Microsystems Inc.
Network Storage 500 Eldorado Blvd. MS UBRM11-194
e-mail: arieh.markel@sun.COM Broomfield, CO 80021
Let's go Panthers !!!! Phone: (303) 272-8547 x78547
(e-mail me with subject SEND PUBLIC KEY to get public key)