This is a Java servlet filter (as per Servlet API 2.3). This filter lets you force locale settings for your web pages (resources). With this filter you can overrule the preferred language as set in the client browser. How to use it: a) download localeflt.jar and save it in WEB-INF/lib b) describe this filter in web.xml. You can set the following optional initial parameters:
<filter> <filter-name>LocaleFilter</filter-name> <filter-class>com.cj.locale.LocaleFilter</filter-class> </filter> d) describe a mapping for this filter in web.xml. E.g.:
<filter-mapping> <filter-name>LocaleFilter</filter-name> <url-pattern>*.jsp</url-pattern> </filter-mapping> in this example filter will be on for the each .jsp file and force locale settings for them. For downloading: Locale filter package: localeflt.jar
See also JSOS - the largest collection of servlets and filters.
|
Also in JSOS:
|