Each JSP file must have charset defined so code pages
other than ISO-8859-1 are supported in JSP 1.2.
Example
In main.jsp, main is translated as ISO-8859-1, even though the
included JSP page defines charset as ISO-8859-2.
main.jsp:
<%@include file="sub.jsp"%>
<h1>Main</h1>
sub.jsp:
<%@ page contentType="text/html; charset=ISO-8859-2" %>
<h2>Sub</h2>
How this works
- The main JSP file is translated based on default encoding
ISO-8859-1.
- When the static include is processed, the included JSP,
sub.jsp, uses the ISO-8859-2 code page.
- The results of processing sub.jsp are embedded the code into main.jsp.
- After the include is processed, encoding uses code page ISO-8859-1
again.
|