On Sat, 25 Aug 2001, Taavi Tiirik wrote:
> Date: Sat, 25 Aug 2001 22:03:20 +0200
> From: Taavi Tiirik <[EMAIL PROTECTED]>
> Reply-To: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: default encoding of jsp pages
>
> How can I set encoding of .jsp page to something other than 8859-1.
>
Add a page directive at the top:
<%@ page contentType="text/html;charset=BIG5" %>
This also sets the charater encoding that will be sent to the browser, so
that it knows how to interpret the content.
In JSP 1.2 (i.e. Tomcat 4) you can also set a "pageEncoding" attribute in
the page directive, in case the page itself is encoded in a character set
different than what you want to set in the response (which is still set
with the contentType attribute).
> thanks in advance,
> Taavi
>
>
>
Craig