|
Problem |
In WebSphere, a JavaServer Page (JSP) written in a
character set other than ISO-8859-1 must set the appropriate character set
in a page directive. |
|
Solution |
A JSP written in a character set other than ISO-8859-1
must set the appropriate character set in a page directive. It cannot be
set dynamically because the page has to be aware of the setting during
translation. Dynamic settings are for runtime only.
You can use setContentType() in JSP but the setContentType() method has no
effect on interpreting the text of the JSP during translation. If a
particular character set is required during translation, that must be
specified in a page directive.
Code example for UTF-8
<%@ page
language="java" pageEncoding="UTF-8" contentType="text/html;charset=UTF-8"
%>
|
|
|
|
|
|
|
|