I'm trying to set a jsp file to load but i have a doubt on it.
What is the content-type of a .jsp file?
application/json or application/javascript ?
The default Content Type is text/xml see Oracle's JSP Globalization Support
Without any page directive settings, default settings are as follows:
The default MIME type is text/html for traditional JSP pages; it is text/xml for JSP XML documents.
The default for the page source character encoding (for translation) is ISO-8859-1 (also known as Latin-1) for traditional JSP pages; it is UTF-8 or UTF-16 for JSP XML documents.
The default for the response character encoding is ISO-8859-1 for traditional JSP pages; it is UTF-8 or UTF-16 for JSP XML documents.
You can override it with the following attributes (specifically contentType):
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
pageEncoding="US-ASCII" %>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With