/** * Determine the fallback time zone for this context. * * <p>The default implementation checks for a JSTL time zone attribute in request, session or * application scope; returns {@code null} if not found. * * @return the fallback time zone (or {@code null} if none derivable from the request) */ protected TimeZone getFallbackTimeZone() { if (jstlPresent) { TimeZone timeZone = JstlLocaleResolver.getJstlTimeZone(getRequest(), getServletContext()); if (timeZone != null) { return timeZone; } } return null; }
/** * Determine the fallback locale for this context. * * <p>The default implementation checks for a JSTL locale attribute in request, session or * application scope; if not found, returns the {@code HttpServletRequest.getLocale()}. * * @return the fallback locale (never {@code null}) * @see javax.servlet.http.HttpServletRequest#getLocale() */ protected Locale getFallbackLocale() { if (jstlPresent) { Locale locale = JstlLocaleResolver.getJstlLocale(getRequest(), getServletContext()); if (locale != null) { return locale; } } return getRequest().getLocale(); }