2 Replies Latest reply on Sep 25, 2002 11:20 PM by clli

    Jetty + Struts + i18n = bug??!!

    clli

      Hi,

      I deployed an i18n ready Struts based application into Jetty and Tomcat with JBoss.

      The application works without any problem in Tomcat but all Chinese words becomes '?' in Jetty.

      I investigated and found that the problem is that tomcat accepts properties files with "/uxxxx" kind of markup, but Jetty requires a UTF-8 formatted properties file to work.

      Is this strange? Or a bug in Jetty?

      Thanks,
      Richard Li

        • 1. Re: Jetty + Struts + i18n = bug??!!
          gregwilkins

          Which version is this?

          For a while it looked like the standards were moving URLs
          towards using UTF8. Jetty probably jumped a little early
          and we have sinced switched back. I'm sure if you
          update to the latest Jetty (4.1.0) or a recent JBoss (eg 3.2.0b) then you will not have this problem.

          You can read about this at:

          http://jetty.mortbay.org/jetty/doc/international.html

          • 2. Re: Jetty + Struts + i18n = bug??!!
            clli

            I just have another way to workaround without transforming the properties files:

            Jetty: <%@ page contentType='text/html;charset=UTF-8' %>
            Tomcat: <%@ page contentType='text/html' pageEncoding='UTF-8' %>

            Adding these directives to every page can solve the problem. It is strange that using the Tomcat's directive to Jetty or Jetty's directive to Tomcat will display '?' for non ascii characters in the browser.