Results 1 to 1 of 1
- 11-30-2010, 09:04 AM #1
Member
- Join Date
- Nov 2010
- Posts
- 1
- Rep Power
- 0
Internet Explorer + AJAX + UTF encoding problem
Hi, I have problem with AJAX responce in Internet Explorer. I have a form with button and backing bean.
Java Code:<h:outputText id="test" value="#{geocodeBean.testUTF()}"/> <h:commandButton value="test" type="button"> <f:ajax event="action" execute="@form" render="test"/> </h:commandButton>I am using Glassfish as a appserver. Everything works OK in Opera, Firefox and Chrome but in Internet Explorer I get error when I run AJAX responce.Java Code:public String testUTF(){ return "ÓĄŚŁŻŹĆŃĘóęąśżźćń test utf"; }
Error states (translation from Polish): malformedXML: XML Parsing Error, invalid character in text
It always points to first non Latin character.
I tried different DOCTYPEs of pages but AJAX is always returned as XML with UTF-8 as encoding.
What can I do to make it work in IE?
PS. Below is infromation from Firefox Firebug:
Request headers
Answer headersJava Code:Host: localhost:8080 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; pl; rv:1.9.2.12) Gecko/20101026 Firefox/3.6.12 Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language: pl,en-us;q=0.7,en;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-2,utf-8;q=0.7,*;q=0.7 Keep-Alive: 115 Connection: keep-alive Faces-Request: partial/ajax Content-Type: application/x-www-form-urlencoded; charset=UTF-8 Referer: http://localhost:8080/index.xhtml Content-Length: 437 Cookie: JSESSIONID=bf0534da72c200d936f3ace73f51; treeForm:tree-hi= Pragma: no-cache Cache-Control: no-cache
AnswerJava Code:X-Powered-By Servlet/3.0, JSF/2.0 Server GlassFish Server Open Source Edition 3.0.1 Cache-Control no-cache Content-Type text/xml;charset=UTF-8 Content-Length 313 Date Tue, 30 Nov 2010 09:05:44 GMT
Java Code:<?xml version="1.0" encoding="utf-8"?> <partial-response><changes><update id="main:geo:test"><![CDATA[<span id="main:geo:test">ÓĄŚŁŻŹĆŃĘóęąśżźćń test utf</span>]]></update><update id="javax.faces.ViewState"><![CDATA[1401236602716723051:-877922355409299404]]></update></changes></partial-response>
Last edited by pacinpm; 11-30-2010 at 09:09 AM.
Similar Threads
-
Internet Explorer not update applet
By billlin in forum New To JavaReplies: 24Last Post: 07-18-2010, 12:45 AM -
Internet Explorer
By maria.mt in forum New To JavaReplies: 2Last Post: 04-17-2009, 05:10 AM -
Client Internet Explorer Setting
By Mir in forum NetworkingReplies: 29Last Post: 06-26-2008, 12:01 PM -
Internet Explorer java version
By shimer in forum Java AppletsReplies: 2Last Post: 07-31-2007, 07:30 AM -
Problems with Internet Explorer and SSL Java
By Peter in forum Advanced JavaReplies: 2Last Post: 07-04-2007, 07:13 AM


LinkBack URL
About LinkBacks

Bookmarks