Spring Framework TimeZoneAwareLocaleContext - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework TimeZoneAwareLocaleContext class.

This code example shows how to use the following methods:getTimeZone
This code example shows how to use the following methods:getTimeZone
This code example shows how to use the following methods:getTimeZone
	public static TimeZone getTimeZone(HttpServletRequest request) { 
		LocaleResolver localeResolver = getLocaleResolver(request); 
		if (localeResolver instanceof LocaleContextResolver) { 
			LocaleContext localeContext = ((LocaleContextResolver) localeResolver).resolveLocaleContext(request); 
			if (localeContext instanceof TimeZoneAwareLocaleContext) { 
				return ((TimeZoneAwareLocaleContext) localeContext).getTimeZone(); 
			} 
		} 
		return null; 
	} 
 
	/** 
	 * Return the ThemeResolver that has been bound to the request by the 
	 * DispatcherServlet. 
	 * @param request current HTTP request 
	 * @return the current ThemeResolver, or {@code null} if not found 
	 */ 
	public static ThemeResolver getThemeResolver(HttpServletRequest request) { 
		return (ThemeResolver) request.getAttribute(DispatcherServlet.THEME_RESOLVER_ATTRIBUTE); 
	} 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
See Code Examples for Spring Framework TimeZoneAwareLocaleContext Methods: