three up, three down, bottom of ninth....

You can use a filter, see j2ee design pattern catalog for more details, and add
to your deployment descriptor this:

  <filter>
    <filter-name>EncodingFilter</filter-name>
    <filter-class>org.myproject.EncodingFilter</filter-class>
    <init-param>
            <param-name>targetEncoding</param-name>
            <param-value>utf-8</param-value>
    </init-param>
  </filter>

btw, are you interested in joining an open-source project that's japanese
related?  I need help:).  see http://j2e-translate.sourceforge.net

-Yan


-----Original Message-----
From: Hassan Schroeder [mailto:[EMAIL PROTECTED] 
Sent: Friday, April 09, 2004 10:41 AM
To: Tomcat Users List
Subject: Re: DefaultServlet character encoding


Mark Thomas wrote:

 > Tomcat ignores META tags (for good reasons I won't go in to). Use <%@ page
 > pagEncoding="..." %>.

...which doesn't work for static HTML pages, where I'm having the
problem...

Allistair Crossley wrote:
> or specify -Dfile.encoding=UTF or whatever in your tomcat startup

..which I have, and which has made no difference, as I stated in
the original mail...

Matt Woodings wrote:
 > if your tomcat is a NT Service, this needs to go in the registry

..which, as the *first line* of the original post says, it's not
("RedHat" != "NT")...


Three up, three down -- anyone else care to try next inning? C'mon,
swing for the fence... :-)


>>-----Original Message-----
>>Subject: DefaultServlet character encoding
>>
>>Config: Tomcat 4.1.29 -- Sun Java 1.4.2_01-b06 -- RedHat ES
>>
>>Problem: static HTML pages meta-tagged to use Shift_JIS are sent as
>>ISO-8859-1.
>>
>>All the googling I've done turns up the suggestion to start Tomcat
>>with -Dfile.encoding=UTF-8 in either JAVA_OPTS or CATALINA_OPTS to
>>make UTF-8 the default. I've tried both, neither made a difference.
>>
>>To baffle me more, my two (unfortunately) divergent dev environments
>>      Tomcat 4.1.27 -- Sun Java 1.4.2_01-b06  -- W2k
>>      Tomcat 5.0.19 -- Sun Java 1.4.1_01-69.1 -- OSX.2.8
>>serve a sample Shift_JIS page just fine "out of the box"...

-- 
Hassan Schroeder ----------------------------- [EMAIL PROTECTED]
Webtuitive Design ===  (+1) 408-938-0567   === http://webtuitive.com

                           dream.  code.



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to