Posts Tagged ‘character encoding’

Get rid of character encoding problems with Java Servlets

// July 29th, 2009 // No Comments » // Tips & Tricks

If you need to send data from a Flex application to a Java Servlet pay attention: not every Java Servlet Container assumes by default that you are sending an UTF-8 encoded request.

To get rid of character encoding problems remember to add the following line of code in your doGet/doPost Servlet method before accessing any request parameter:

1
request.setCharacterEncoding("UTF-8");

That’s all!