On Mon, 27 Aug 2001, Kwan, Kenneth Y wrote:

> Date: Mon, 27 Aug 2001 18:05:08 +0800
> From: "Kwan, Kenneth Y" <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Ho to change default ContentType ?
>
> By default, JSP compiler generates ��response.setContentType(��text/html;
> charset=ISO-8859-1��) in every JSP page. I can change the type by manually
> inserting ��response.setContentType(��text/html; charset=xxx��) in every JSP
> page.
>

Note that this is only guaranteed to work in JSP 1.2.  The portable way in
JSP 1.1 is to use a page directive:

  <%@ page contentType="text/html;charset=xxx" %>

> Is there any way to change the ��default�� charset in ContentType such that
> there is no need to setContentType manually?
>

No ... the JSP Specification declares that the default encoding is
ISO-8859-1 unless you explicitly define it as something else.

> Kenneth
>

Craig


Reply via email to