站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Spring Framework 2.0.5 API 文档英文版

JstlUtils (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版

The Spring Framework

org.springframework.web.servlet.support
Class JstlUtils

java.lang.Object
  extended by org.springframework.web.servlet.support.JstlUtils

public abstract class JstlUtils
extends Object

Helper class for preparing JSTL views, in particular for exposing a JSTL localization context.

Since:
20.08.2003
Author:
Juergen Hoeller

Field Summary
static String REQUEST_SCOPE_SUFFIX
           
 
Constructor Summary
JstlUtils()
           
 
Method Summary
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 message source.
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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REQUEST_SCOPE_SUFFIX

public static final String REQUEST_SCOPE_SUFFIX
See Also:
Constant Field Values
Constructor Detail

JstlUtils

public JstlUtils()
Method Detail

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.

Parameters:
servletContext - the ServletContext we're running in (to check JSTL-related context-params in web.xml)
messageSource - the MessageSource to expose, typically the ApplicationContext of the current DispatcherServlet
Returns:
the MessageSource to expose to JSTL; first checking the JSTL-defined bundle, then the Spring-defined MessageSource
See Also:
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 message source.

Parameters:
request - current HTTP request
messageSource - the MessageSource to expose, typically the current application context

The Spring Framework

Copyright © 2002-2007 The Spring Framework.