Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

How to assign a java variable value to JSTL tag attribute ?

843838Mar 9 2007 — edited Mar 12 2007
Hi,
I am having a String variable declared in my JSP. I would like to assign that value to the attribute of a JSTL tag. ie
in welcome.jsp, i have the following code..
<%
String myLocale=mySession.myProfile().getLocale().toString();
%>
When I am assigning the value of myLocale to JSTL tag , ie..
<fmt:setLocale value="${myLocale}" />
the value of myLocale is not assigned properly. fmt tag takes the
en-US locale all the time, evenif , myLocale can have ja-JP,ko-KR etc..
How can i do this assignment ..? Thanks in advance and waiting for your response..

Aneesh K

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Apr 9 2007
Added on Mar 9 2007
3 comments
635 views