Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9010565
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:29:42+00:00 2026-06-16T02:29:42+00:00

I use MyEclipse to compile my program,and I want to achieve internationalization , so

  • 0

I use MyEclipse to compile my program,and I want to achieve internationalization, so I choose use the fmt tag.

The follow is the code:

<fmt:setLocale value="${param.locale }" scope="session" />

Book says that ${param.locale } can get the browser’s default-language. In order to change the language, I use two languages, English and Chinese. Though I set the browser’s default-language to English, when I reload the jsp page, the language is always Chinese. Could you tell me what’s the matter?

full codes:

<%@ taglib prefix="fmt" uri="java.sun.com/jsp/jstl/fmt"; %> 
<fmt:setLocale value="${param.locale }" scope="session" /> <fmt:setBundlebasename="loginpage"/> <input type="text" id="text1" /> <br/> <input type="password" id="text2" /> <br /> <input type="submit" id="smb" value="<fmt:message key="login_sub" />" />     
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:29:44+00:00Added an answer on June 16, 2026 at 2:29 am

    No that’s not true. The EL param object maps a request parameter name to a single value. If param.locale exists then you can set locale through fmt:setLocale/> tag.

    Text from this article – Formatting and internationalization through custom tags

    The locale used by the JSTL tags when formatting data is normally
    determined by examining the Accept-Language header sent by a user’s
    browser as part of each HTTP request. If no such header is present,
    then JSTL provides a set of JSP configuration variables you can set to
    specify a default locale. If these configuration variables have not
    been set, then the JVM’s default locale is used, which is obtained
    from the operating system the JSP container is running on.

    and take a look at SO thread – How to set JSTL locale from Java code?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I use myeclipse and jboss5.0.1 server.mysql is the database that i use. I want
use C#,want to upload excel file on google doc. bellow syntax use to upload
I use MyEclipse 8.6 + Apache Tomcat 5.5.27 + JRockit 1.6.0 05 for web
We currently use MyEclipse with its built-in Maven4MyEclipse integration and its built-in J2EE server
I use the built-in maven of MyEclipse 8.5 to create maven projects. It shows
I am using MyEclipse and I use an Enterprise Application Project (EAP) that automattically
I am using compile time weaving with aspectj to weave in Spring's transactional code
Well, I am writing an android application and I want to use Socket.IO-Client for
I want to use the apache commons configuration jars in my Maven project. When
Since 2005 we are using MyEclipse as our standard development tool. We use it

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.