Tuesday, April 25, 2006

Request Encoding

In JSP you have to manually set request encoding otherwise it will default to iso-8859-1. With the default you won't access any param whose value is not in iso-8859-1 encoding correctly. e.g., the copyright character "©".

To set request encoding, use jstl:

xmlns:fmt=http://java.sun.com/jsp/jstl/fmt

<fmt:requestencoding value="utf-8">

No comments: