Bug 8547

Summary: fmt:setLocale does not seem to set configuration variable
Product: Taglibs Reporter: Prasad Subramanian <prasad.subramanian>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED INVALID    
Severity: major    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: Other   
OS: other   

Description Prasad Subramanian 2002-04-26 08:44:37 UTC
<fmt:setLocale value="hi_IN" does not seem to affect the config variable 
javax.servlet.jsp.jstl.fmt.locale

<%=pageContext.getAttribute("javax.servlet.jsp.jstl.fmt.locale
")%> returns a null
Comment 1 Jan Luehe 2002-04-26 16:41:41 UTC
Not a bug.
If you are using PageContext.getAttribute() (directly) to get the value of a
configuration variable, you must append the name of the scope to the name of the
configuration variable. Applied to your example, use this:

  <%= pageContext.getAttribute("javax.servlet.jsp.jstl.fmt.locale.page") %>

Alternatively, you may use

  <%= javax.servlet.jsp.jstl.core.Config.find(pageContext,
"javax.servlet.jsp.jstl.fmt.locale") %>
  
which appends the scope automatically.