1 11 12 package org.jivesoftware.util; 13 14 import javax.servlet.*; 15 import javax.servlet.jsp.jstl.core.Config; 16 import java.io.IOException ; 17 18 21 public class LocaleFilter implements Filter { 22 23 private ServletContext context; 24 25 public void init(FilterConfig config) throws ServletException { 26 this.context = config.getServletContext(); 27 } 28 29 32 public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) 33 throws IOException , ServletException 34 { 35 Config.set(context, Config.FMT_LOCALE, JiveGlobals.getLocale()); 41 42 chain.doFilter(request, response); 44 } 45 46 47 public void destroy() { 48 } 49 } 50 | Popular Tags |