|
| Problem | Each JavaServer Page™ (JSP™) using the JSP 1.2 standard must have charset defined to support code pages other than the ISO-8859-1 code page. | | | | Solution | Each JSP file must have charset defined so code pages other than ISO-8859-1 are supported in JSP 1.2.ExampleIn 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.
| |
| | |
| |
|
Product categories: Software, Application Servers, Distributed Application & Web Servers, WebSphere Application Server, JSP Operating system(s): Multi-Platform Software version: 3.5, 4.0, 5.0, 5.1, 6.0 Software edition: Edition Independent Reference #: 1179410 IBM Group: Software Group Modified date: 2004-09-14
(C) Copyright IBM Corporation 2000, 2004. All Rights Reserved.
|