The fix was simple, I had to re-save the .jsp file by providing a pageEncoding attribute at the top in my (Eclipse) IDE:
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>so that the page characters will not be saved with the default JSP encoding of ISO-8859-1.
The charset (contentType="text/html; charset=UTF-8") is the encoding with which the rendered JSP (final output) will be served to a browser while the page encoding (pageEncoding="UTF-8") is the encoding which the JSP compiler will use to understand the contents of the JSP page (saved as a text file) so that it can compile it correctly to a .class file.
No comments:
Post a Comment