JSP Tutorials - Herong's Tutorial Examples - v5.11, by Herong Yang
Characters Traveling from JSP Files to Browser Screens
This section describes how character text travels from JSP pages to Web browser screen through various steps using different technologies on different steps.
Handling non ASCII characters in JSP files correctly is not an easy task. I have seen many messages on the Web in this area reporting various frustrating situations. One main reason is that text entered in a JSP file must travel through many steps before being displayed by a browser on a screen.
The following diagram illustrates steps that characters must travel from a JSP file to a browser screen, and computing technologies that are used at different steps:
0. Key Sequences from Keyboard | |- Text Editor v 1. JSP File | |- XML Parser v 2. Java Source File | |- Java Compiler v 3. Java Class File | |- Java Virtual Machine v 4. HTML Document | |- Web Server v 5. HTTP Response | |- Internet TCP/IP Connection v 6. HTTP Response | |- Web Browser v 7. Characters on the Screen
Since all computing technologies are using ASCII encoding by default, text of ASCII characters can safely travel through those steps without any issues.
However, for non ASCII characters, we have to watch out each step carefully to make sure that characters are not damaged and decoded correctly if encoded.
Table of Contents
JSP (JavaServer Pages) Overview
Tomcat Installation on Windows Systems
Syntax of JSP Pages and JSP Documents
JavaBean Objects and "useBean" Action Elements
Managing HTTP Response Header Lines
►Non-ASCII Characters Support in JSP Pages
►Characters Traveling from JSP Files to Browser Screens
Handling ASCII Characters in JSP Pages
Presenting Non ASCII Characters in HTML Documents
Entering Non ASCII Characters in JSP Pages
Java Strings as non-Unicode Encoded Byte Sequences
Java Strings as Unicode Encoded Byte Sequences
Entering Non-ASCII Characters as Static Text
Static HTML Text in JSP Page in Standard Syntax
Static HTML Text in JSP Page in XML Syntax
Supporting Characters in Multiple Languages
Overview of JSTL (JSP Standard Tag Libraries)
Multiple Tags Working Together
Using Tomcat on CentOS Systems
Connecting to SQL Server from Servlet