My web application has a Flex as front-end or as UI point and Java as back-end.
In which all the request are come in servlet from the flex side.
But when i enter a some value in text-box in Spanish language or other than English and the request parameter is read in servlet it contain some different value String as what i have enter in text-box in front-end..
i didn't understand whats going on with other language..
can any one help...
0
votes
stackoverflow.com/questions/374573/…
– jmj
Can you give an example? What do you enter and what is the result in the servlet?
– boes
Can you give an example of this "different value" that you are seeing? You are mostly likely not setting the encoding for the incoming request (either in your HTML form, or in the servlet container for reading URLs).
– Vineet Reynolds
thanks to all i got the solution..
– Yagnesh Agola
Yagnesh: can you please post an answer to the question yourself and then accept that answer? Also, you need to accept answers to previous questions if they fix your problem.
– Zecas
1 Answers
0
votes
Thanks to all i got the solution, and posted here,
The problem is that the information sent by the browser hasn't got a well-defined encoding.
But most of browsers will use the encoding of the page.So if you use UTF-8 in all your pages, then most browsers will send all data in UTF-8 encoding as well.
You can tell your application server to treat any input as UTF-8, by calling,
request.setCharacterEncoding("UTF-8");