Vernon:

> 1)
> I follow the instruction and insert the line:
> <%@ taglib uri="http://java.sun.com/jstl/ea/fmt"; prefix="fmt" %>
> in a JSP file, and the lines:
> 
>   <context-param>     
>       <param-name>javax.servlet.jsp.jstl.i18n.basename</param-name>   
>       <param-value>mm</param-value>   
>   </context-param>   
> in the web.xml file.
> 
> I also have three resource files in place: mm.properties,
> mm_en.properties, and mm_zh.properties.
>
> I get an exception when I try to bring up the jsp page (see the
> error message on the bottom).
> After I replace the format tag lib of JSTL with the followings:
> 
> <%@ taglib uri="http://jakarta.apache.org/taglibs/i18n-1.0"; prefix="i18n" %>
> 
> <i18n:bundle baseName="mm"
>              id="bundle"/>
> 
> The English version displays properly under the browser language
> setting with ?en? higher than ?zh?.
> 
> To my understanding, the code base of i18n and fmt tag libraries are
> the same (You wrote it).

Actually, the two taglibs use different code bases.
I claim responsibility for JSTL's FMT taglib only. ;-)

Please upgrade to the latest version (nightly build) of the JSTL RI
and make these changes:

- Change the uri in your taglib directive from

  "http://java.sun.com/jstl/ea/fmt";

to

  "http://java.sun.com/jstl/fmt";

- Change
  
  javax.servlet.jsp.jstl.i18n.basename

to 

  javax.servlet.jsp.jstl.fmt.localizationContext

in your web.xml.

> 2)
> When 'zh' is higher than 'en' in the browser's language setting, all
> messages in the resource file are displayed as ???.  And I find out
> the locale and character setting on the page is en_US and ISP-8859-1
> respectively. All jsp files have the character set as UTF-8 since
> each jsp file started with <%@ page contentType='text/html;
> charset=UTF-8' %>. All JSP file is formed from several regions:
> banner, side bar, footer, and body.

Are you using the "i18n" or JSTL's "standard" taglib?
Which container are you using?
If you are not already using the latest version of the "standard"
taglib, could you please upgrade to it, run your example again, and
let me know if you still have any problems?

Thanks,


Jan





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

Reply via email to