Bug 8547 - fmt:setLocale does not seem to set configuration variable
Summary: fmt:setLocale does not seem to set configuration variable
Status: RESOLVED INVALID
Alias: None
Product: Taglibs
Classification: Unclassified
Component: Standard Taglib (show other bugs)
Version: unspecified
Hardware: Other other
: P3 major (vote)
Target Milestone: ---
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-04-26 08:44 UTC by Prasad Subramanian
Modified: 2004-11-16 19:05 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.