类 JstlUtils
- java.lang.Object
- org.springframework.web.servlet.support.JstlUtils
构造器概要
构造器 构造器 说明 JstlUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static void
exposeLocalizationContext(HttpServletRequest request, MessageSource messageSource)
Exposes JSTL-specific request attributes specifying locale and resource bundle for JSTL's formatting and message tags, using Spring's locale and MessageSource.static void
exposeLocalizationContext(RequestContext requestContext)
Exposes JSTL-specific request attributes specifying locale and resource bundle for JSTL's formatting and message tags, using Spring's locale and MessageSource.static MessageSource
getJstlAwareMessageSource(ServletContext servletContext, MessageSource messageSource)
Checks JSTL's "javax.servlet.jsp.jstl.fmt.localizationContext" context-param and creates a corresponding child message source, with the provided Spring-defined MessageSource as parent.
构造器详细资料
JstlUtils
public JstlUtils()
方法详细资料
getJstlAwareMessageSource
public static MessageSource getJstlAwareMessageSource(ServletContext servletContext, MessageSource messageSource)
Checks JSTL's "javax.servlet.jsp.jstl.fmt.localizationContext" context-param and creates a corresponding child message source, with the provided Spring-defined MessageSource as parent.- 参数:
servletContext
- the ServletContext we're running in (to check JSTL-related context-params inweb.xml
)messageSource
- the MessageSource to expose, typically the ApplicationContext of the current DispatcherServlet- 返回:
- the MessageSource to expose to JSTL; first checking the JSTL-defined bundle, then the Spring-defined MessageSource
- 另请参阅:
ApplicationContext
exposeLocalizationContext
public static void exposeLocalizationContext(HttpServletRequest request, MessageSource messageSource)
Exposes JSTL-specific request attributes specifying locale and resource bundle for JSTL's formatting and message tags, using Spring's locale and MessageSource.- 参数:
request
- the current HTTP requestmessageSource
- the MessageSource to expose, typically the current ApplicationContext (may benull
)- 另请参阅:
exposeLocalizationContext(RequestContext)
exposeLocalizationContext
public static void exposeLocalizationContext(RequestContext requestContext)
Exposes JSTL-specific request attributes specifying locale and resource bundle for JSTL's formatting and message tags, using Spring's locale and MessageSource.- 参数:
requestContext
- the context for the current HTTP request, including the ApplicationContext to expose as MessageSource