Why JSTL change the encoding of response?

Dear all,
I use JSTL to display multiple language, and it can work fine. I also have a servlet to let the user to select the display language. All the request and response encoding is set to UTF-8, but I found that when user choose language to Chinese, and the servlet set the Locale to ZH, and then, all the jsp file which use JSTL to display message, the response is set to "GB2312"!
Why this happen? because the response encoding is gb2312, so I cannot get the user inputted Chinese character! I want still reserve the UTF-8, how can I do that? I just found that webapp 2.4 can set locale-encoding-mapping, but I am using tomcat4.1.4, which does not support 2.4.
Any advice will be appreciate.
Lichunlin

Hi, everyone,
I find that the setLocale method of Reponse will change the response encoding automatically according to the locale, for example, the page encoding is UTF-8, but after I set locale to "CN"(china), the encoding is changed to "GB2312", but I still want it is "UTF-8".
So I have to change the message tag source code, to change the encoding back after the setLocale method invoke, it is not so good, but it can work now.
Could you have any other advice? Thank you very much.
Lichunlin
Dear all,
I use JSTL to display multiple language, and it can
work fine. I also have a servlet to let the user to
select the display language. All the request and
response encoding is set to UTF-8, but I found that
when user choose language to Chinese, and the servlet
set the Locale to ZH, and then, all the jsp file which
use JSTL to display message, the response is set to
"GB2312"!
Why this happen? because the response encoding is
gb2312, so I cannot get the user inputted Chinese
character! I want still reserve the UTF-8, how can I
do that? I just found that webapp 2.4 can set
locale-encoding-mapping, but I am using tomcat4.1.4,
which does not support 2.4.
Any advice will be appreciate.
Lichunlin

Similar Messages

  • How to change the Encoding type of a XML

    Hi all,
    I'm having a XML(generated at run time) with UTF-8 Encoding. If I'm going to parse it, getting an error saying "*Document root element is missing*".
    If I change the encoding to ANSI, it parses without error.
    How can I change the encoding type of a documnet ?
    Any comment welcome.
    Kaushalya

    There's no such thing as the "encoding of a String". If you produced a String from a sequence of bytes using the wrong encoding, you may not be able to repair that problem by hacking about in your code. You're better off to produce the String using the correct encoding in the first place. Read this for more information about XML and encodings as you appear to be misunderstanding basic concepts:
    [http://skew.org/xml/tutorial/]

  • Changing the encoding to 256 kbps from the standard 128 kbps

    I just read an article on the Internet about earbuds, especifically the Shure 4c, in which it was "highly reccomended" to change the encoding to higher levels such as 256 kbps from the "standard" 128 kbps.
    The question is, once you have all your songs in iTunes downloaded at the standard 128 kbps, how do you change the encoding to 256 kbps, without deleting everything and transfering all your CDs, etc, all over again? Can it be done without the obvious, do it all over?
    Thanks

    Pedro, this will not be possible. You can't convert a lower bitrate to a higher one & gain anything in quality. The maximum data has already been compressed & removed under the lower bitrate & can't be put back. If you truly want the benefits of the higher bitrate, it would be much better to re-import your CD's at the 256 bitrate. Post back if you have any questions.

  • How Can i change the Encoding for Mp3 cds???

    I am curious on how i can chane the Encoding With on i tunes.....The reason is im heavily into car audio and always like to see the names of the bands and song title come up when i play them in my car. Ive noticed certain bands show up on the screen of my cd player..but others say no artist. Ive Also noticed some have a different encoding such as Lame 3.96....... Does Anyone Know How to Change the Encoding With....Or Make it Show up on my car cd player?

    Do you mean you'd rather import using say AAC for instance instead of mp3?
    Go to iTunes Preferences (+,)>advanced>importing>import using> change to which ever format you desire.
    When you burn the cd, check "include CD text" under the audio section if you're burning an audio CD.

  • Why Oracle changes the export path

    Hi,
    I am doning an export with direct=y. But during the export I have got the message as: EXP-00067: Table xxxx will be exported in conventional path.
    Why Oracle changes the export path into conventional?

    It can be extremely annoying - our supplier added
    some clobs to some of our bigger tables, nothing in
    them at all, but it has massively increased our
    export times.How often is this a problem and why? In most places import/export would be a pretty rare scenario - upgrades and migrations would seem the most likely usage scenario.
    Niall Litchfield
    http://www.orawin.info/

  • HT1645 I did step 2 but my computer isn't giving me the pop-up in step 3 so i can't push an OK button.  I waited 15+ hours for it to burn and it sent me to this page.  I have tried to change the encoding settings again, and it adjusts the capacity but no

    I did step 2 in the "iDVD:  Setting Encoding preferences" but my computer isn't giving me the pop-up in step 3 so i can't push an OK button in regards to the message.  I waited 15+ hours for it to burn and it sent me to this page.  I have tried to change the encoding settings again, and it adjusts the capacity but no message pop-up appears.

    You can undo your permission changes. Probably the most relevant one is cookies. Try one or both of these methods:
    (1) Page Info > Permissions tab
    While viewing a page on the site:
    * right-click and choose View Page Info > Permissions
    * Alt+t (open the classic Tools menu) > Page Info > Permissions
    (2) about:permissions
    In a new tab, type or paste '''about:permissions''' and press Enter. Allow a few moments for the list on the left to populate, as this information needs to be extracted from a database.
    Then type or paste ''rcn''' in the search box above the list to filter it to the most relevant domains. When you highlight a domain, you can adjust its permissions in the right pane.
    Any luck?

  • How to change the encoding value in jdom?

    When I create a new xml file by using jdom, the encoding value of xml is "UTF-8"
    (<?xml version="1.0" encoding="UTF-8"?>).
    How can I change encoding value to "big5"??
    Thanks

    Use this method (JDom API)
    XMLOutputter.setEncoding(java.lang.String encoding)
    Regards,
    Darren

  • Why not change the  Macintosh HD to a shorter name.

    I have a friend that picked up a Mac mini with OS X 10.5.8 and one for the first things
    I noticed was the previous owner had changed the name of the single drive from Macintosh HD
    to a shorter name
    I recall reading somewhere that it is not a good idea to change the name of the primary
    hard drive from Macintosh HD and I cannot remember why.
    Can someone point me to a document that describes why the primary hard drive should not be renamed?

    {Usually the problem occurs when a user changes the Short Name of the
    computer where it affects how it is then seen in a network, and does this
    improperly so the computer can't be networked until this issue is fixed.}
    • Mac OS X: How to change user short name or home directory name:
    http://support.apple.com/kb/ht1428
    • Mac OS X (10.4) Help: What's my computer's name and address?
    http://docs.info.apple.com/article.html?path=Mac/10.4/en/mh632.html
    • How do I change the Owner's Name on my Mac?
    http://www.askdavetaylor.com/howto_change_owners_name_applemac.html
    And if you change the Short Name (account user, etc) then KeyChain
    access and other items may well be a real problem to weed out & fix.
    Note the comments, after the basic info in this thread:
    • Changing Names - Root - Mac Gems - MacWorld:
    http://www.macworld.com/article/41481/2004/12/changeshortname.html
    Or, if a user changes the name of their User Account, improperly, then the
    account won't match the password and other issues will result; unless it
    is fixed or the problem of changing the name incorrectly in the first place
    is avoided; since there is a proper way to change the short name of the
    computer (not that on the icon of the hard disk drive, btw) and a correct
    way, a process, to change the user account name.
    It is not advised to change the User name on an account or that of the
    Computer's name where it is seen on a network. That aside, the name
    change of the computer's Hard Disk Drive, at the icon on the desktop,
    can be avoided by using Dock preferences to Hide the HDD so it will
    not appear on the desktop at all. (Kids in schools change the HDD icon's
    name frequently, when it is available and the computer not set up to
    work under the Parental Controls or lower user account privilege access.)
    +You can change the name of the Hard Disk Drive and that won't make+
    +much difference; except in those cases where you have an Alias of the+
    +original name, since it would no longer activate access to the Mac HD.+
    I got over the urge to change the HDD name some time ago. However
    if you partition the original hard disk drive so you have two icons on the
    Desktop, you could have fair reason to change the names if you like.
    (Just remember, if you make a clone, or do any complete computer drive
    backup to some external device, the name change could affect the result.)
    If you have an Intel-based Mac running Windows, you may have a different
    matter in re-naming the hard disk drive; since Windows may require another
    avenue into the means to rename that drive. And then, that may be a problem.
    *You can change the Mac HD to any name.* In previous Mac OS (pre-x) versions
    it was also common for users to change the hard drive icon to some other one,
    and if they'd named the computer (a monster name, for example) a new image
    for the icon could easily be applied through a copy-paste. In fact, that may still
    be something one may be able to do, through a different agency in OS X.
    And, when installing an all-new OS X, you can also change the name of the Mac HD
    in Disk Utility, since the name is blank after choosing a partition scheme & reformat.
    The real issue revolve around changing the computer's short name, and changing
    the user's account name(s) since this is where problems begin that are harder to fix.
    If the rules are followed in regard to these two, going into the situation, problems
    are more readily avoided. I just don't change those things, since I'm too busy.
    Good luck & happy computing!
    { edited 2x }

  • How change the encoding of xsd?

    Hi.
      I have an xsd file that has as encoding the ISO-8859-7. When importing it into XI the encoding is changed to ISO-8859-1.
    To be more specific the
    <?xml version="1.0" encoding="ISO-8859-7"?>
    is converted to
    <?xml version="1.0" encoding="ISO-8859-1"?>
    How can I change this one?

    Hi,
    Re: How to change the incoming xml to a different namespace

  • Why I change the energy level of port in PoE switch, the power usage of port no anyt change

    I am enable the EnergyWise on a 3560, plug a IP Phone to a port, the result of the power usage read by SNMP is 6kw, when i change the energy level from 10 to 0 by SNMP, the LCD on IP Phone is goes to dark and phone cannot be use, but when I get the power usage of port by SNMP again, the result still is 6kw. Can anyone tell me why?

    This project is just a short animation so every time I import the stills they are of the wrong duration so I try changing the duration by the other methods described previously, fail to be able to do that, erase everything from the project, restart and start again, initially with the preferences. So there's nothing for the still frames to conflict with. It's not the fact that there is a batch of stills that is the problem either as I keep experimenting with with single or small groups of stills in that context. I've also tried importing a variety of still formats into other projects. This is fairly new software. Could this be an incurable fault?
    1.25GHz Power PC G4 1MB L3 cache   Mac OS X (10.4.9)   80GHz hard drive 1.5 GHz Ram plus Firewire 400 250 GHz la Cie external hard dri

  • How I may change the encoding names for downloaded files?

    I have some problem with encoding when I download files from russian sites. The downloaded files look like this "ìîé êàáèíåò - èíôîðìàöèÿ"

    Firefox, as is, will only download the file. You can choose where the file is
    saved, but that's it.
    Go to the '''''[https://addons.mozilla.org/en-US/firefox/ Mozilla Add-ons Web Page]''''' {web link}
    (There’s a lot of good stuff here) and search for '''download managers.'''
    Many of them give you a chance to change the file name.

  • How can I change the encoding of a font "on the fly" in Illustrator

    Is it possible to do that. I saw that in CorelDraw if you press Ctrl+Shift+E with a text selected a dialog windows appears with the option to choose beteen different code tables, so non unicode fonts can be made to show the right gliphs. Or maybe there is a script somewhere I dont know of. Thank you in advance!

    Monika Gause wrote:
    Set the encoding when placing the text in Illustrator
    How can I do that? I know that I can do my work in Corel then copy-paste it in Illustrator, but I wanted to know if there is a way to do it in Illustrator, besides I dont want to go back and forth between them, if I later dacide to make some corrections. Thank you!

  • How can I temporary change the encoding of the current page as I can do on IE ?

    In IE, I can choose the encoding of the current page from the menu bar. How can I do this on Firefox ?
    Just the current page only. Not the preferred language in option menu please.

    Hi Aaron,
    If you want to see the most recent n samples in your chart while n can be modified during runtime, than I might have a solution for you...
    Please check out the modified VI.
    Regards,
    Thomas
    Attachments:
    Waveformdatapoints_mod.vi ‏13 KB

  • Changing the encoded link to an aggregated task in MySite

    Hello,
    we have created a task process in SPD with a content type of Workflow Task 2013.
    A user starts the workflow and the task is then assigned to a user. The task is synchronized in his MySite and then wants to either approve or reject the request of this task. But when he clicks on the task the link goes to the EditTask.aspx in MySite and
    not the EditForm.aspx of the Task. The problem is then that the user cannot direct approve or reject, only set "Completed" and then the task will be ended with the default value. Furthermore it seems that even the Description field is not the same
    as its not synchronized.
    We want either to change the link to direct to the editform.aspx of the task or to be able to edit the EditTask.aspx so that one could have also the possibility to directly reject.
    Any help is appreciated!
    Thanx in advance,
    Ioannis

    Hi,
    Yes, it is strange. As My Tasks is related to Search Service Application, Work Management Service Application and User Profile Synchronization Service. You can take steps as below for troubleshooting:
    Created a WMA service from Central – Quick and easy
    Created Incremental Crawls to happen across all the content sources, setup people search, my sites search.
    Made coffee and waited.
    Didn’t work. Bit more digging around the web mentioned that the App Pool accounts for the Site and WMA service should be the same. Not ideal solution but gave it a shot.
    It didn’t work at first, but then, I deleted my existing WMA Service Application and recreated it, but making sure the App Pool ID that I used was the same as my Web Applications.
    Reference:
    http://wellytonian.com/2013/10/issue-tasks-update-within-sharepoint-2013/
    http://blog.amtopm.be/2013/02/22/getting-personal-tasks-from-the-user-profile/
    http://www.lifeonplanetgroove.com/mytasks-workmanagement-task-aggregation-apis-sharepoint-online/
    Thanks,
    Eric
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Eric Tao
    TechNet Community Support

  • Why I changed the battery of my macpro but it didn't turn on?

    My battery died and changed the battery at apple Genius Bar but it didn't turn on and they are saying I will back up my data and pictures so they can restore it.
    The problem is how can we back it up when I it doesn't turn on.?? I spend 140$ for battery and 110$ for a external storage device but still my macpro is no use!
    Pls help me.

    what is the charger indicator saying? whats the charge level indicator, orange, green?
    Since they installed the battery, take it back to fix the error.

Maybe you are looking for

  • Phone Powers Off 10+ times a day

    So I've been reading that the phone powers off by itself, and occasional power downs didn't really bother me.  It is starting to do it now while I'm on the phone, surfing the net, or using apps.  This is bothersome as today I've counted 11 turnoffs. 

  • Disappearing favicons from bookmarks

    Posting this issue on behalf of my father. He has a bunch of commonly visited sites bookmarked on his iPad "desktop", and until recentlh, the icons for said bookmarks were the favicons from the bookmarked sites. Now they have all been replaced by a g

  • Upgrade from 10.8 mountain lion–Should I or shouldn't I?

    Greetings. I was ready to upgrade from 10.8 mountain lion to Yosemite but see all of the issues once upgraded that many have had. Now second guessing. Should I or shouldn't I? Is it worth it? I am a graphic designer and use for business as well as us

  • HOW JVM WORKS

    Hi All, Plz Tell me How JVM Works?? Vishal.

  • SAP enhancement project (ARVL0001)

    Hi All, I want to know on SAP enhancement project (ARVL0001), currently i am in sap 4.7 version. In SDN i have not got any good links to find on this. Can any one help me out in getting the steps or sample scenarios where we can use this ARVL0001 enh