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