JSP Tutorials - Herong's Tutorial Examples - Version 4.02, by Dr. Herong Yang
Handling ASCII Characters in JSP Pages
This section provides a tutorial example to show that ACSII characters entered in JSP pages will show up on browsers without any trouble. All technologies used different steps support ASCII by default.
As I mentioned earlier, ASCII characters can travel from JSP files to browsers easily without any trouble. Here is a simple JSP file with ASCII characters only:
<?xml version="1.0"?> <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"> <!-- HelpASCII.jspx - Copyright (c) 2012, HerongYang.com, All Rights Reserved. --> <jsp:directive.page contentType="text/html"/> <html><body> <b>Help</b><br/> <p>This is a very simple help page...</p> </body></html> </jsp:root>
If you view this page with a browser, you will get two lines of characters:
Help This is a very simple help page...
The output text is exactly what I entered into the JSP file.
Last update: 2012.
Table of Contents