This content has been marked as final. Show 6 replies
Couple of things :
a. You must consider setting request encoding, page encoding and response encoding.
b. Whether database setup is done to store and retrieve Greek characters. You can test it separately. And it is surely not the culprit for not displaying data in JSP page received from another JSP.
c. Server setup is done to support ISO-8859-7 character set. For example, in tomcat conf/server.xml the <connector > should have attribute URIEncoding set to appropriate character set. For example:
d. In case application code manipulates (byte to string or string to byte conversion) Greek string data, it must consider appropriate character set whenever necessary.
<Connector port="8080" maxThreads="150" minSpareThreads="25" maxSpareThreads="75" enableLookups="false" redirectPort="8443" acceptCount="100" debug="0" connectionTimeout="20000" disableUploadTimeout="true" URIEncoding="UTF-8"/>
I suggest one more thing: Without XMLHttpRequest test your JSP pages normally to verify your application works with Greek data.
Thank you for your answer.
Well the number (a) of your answer i have tested strongly.
In (b) i agree it is irelevant, i just mentioned it
(d) is perhaps out of the question. It is a very simple process of transferring data. Whatever string comes, goes to the jsp2.
I have already tested it without XMLHttpRequest by <input type="submit"... and it works fine. That is why i mentioned all the proccess that i used on XMLHttprequest.
But another thing has come to surface. I tested it with firefox and it works fine bot with XMLHttpRequest and submit button. Only Internet explorer has this problem with XMLHttpRequest. I think i must search the cause on the character encoding manipulation of explorer and how it reacts with div.innerHTML.
If there are any suggestions, i am all ears....
Actually since there i a body with PARAM_NAME=PARAM_VALUE on the XMLHttpRequest there must be
this.xmlHttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded; charset=UTF-8");
If i write
this.xmlHttp.setRequestHeader("Content-Type", "text/html; charset=UTF-8");
the params will not be transfered and be null when i receive them in java code.
I have tried exactly the same with ISO-8879-7 but not with UTF-8. It works fine with this simple example that i have discussed before as well
as with more complex MVC that i have already developed and just waiting for the correction.
I have tried it with Internet Explorer as well as Firefox.
Thank you for your answer. You really helped me with this mess. When i get the time i must study a little about character encodings....