tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arieh Markel <Arieh.Mar...@central.sun.com>
Subject [tomcat_32] how to get Locale from Request
Date Tue, 10 Oct 2000 20:29:26 GMT
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)


Mime
View raw message