You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Eric Tse <er...@netvigator.com> on 2002/12/26 04:26:45 UTC

ApplicationResources

Dear all,

I am trying to feed in 3 languages on my web, i.e. English (en-us), Traditional Chinese (zh-hk), and Simplified Chinese (zh-cn).

I named the application resources as follows:

ApplicationResources.properties           (for en-us)
ApplicationResources_zh.properties          (for zh-hk)

they work!! But when the following settings apply.... 

ApplicationResources.properties           (for en-us)
ApplicationResources_zh_hk.properties          (for zh-hk)
ApplicationResources_zh_cn.properties          (for zh-cn)

only en-us works! :~(

any hint?

Regards,
eric

Security in struts/websphere

Posted by Jitendra Singh <ji...@hotmail.com>.
I am developing a new struts application on websphere with security
constraints. My question is not about struts or may be it is.
I want to know how can i access the login-passwd information of a windows
user accessing my application running on solaris. or how is it possible to
authenticate/authorize him againist his local authentication.

Not sure where to post it. but looks like this forum always helps me so am
here ..

thanks in advance,
Jitendra

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ApplicationResources in UTF-8

Posted by Eric Tse <er...@netvigator.com>.
Dan,

Thanks a lot!! It works for me now!! :)

Eric

----- Original Message -----
From: "Dan Tran" <da...@hotmail.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Saturday, December 28, 2002 8:30 AM
Subject: Re: ApplicationResources in UTF-8


> This link works for me
>
> http://www.anassina.com/struts/i18n/i18n.html
>
> -D
> ----- Original Message -----
> From: "Eric Tse" <er...@netvigator.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
> <vi...@zimono.com>; <VE...@engr.sc.edu>
> Sent: Friday, December 27, 2002 11:57 AM
> Subject: ApplicationResources in UTF-8
>
>
> > Hi Vipul,
> >
> > Thanks for your mail. I know what you mean. But even I tried to set the
> > locale to hk, it works neither :)
> >
> > I know the root cause to my problem. The filename of application
resource
> > should be "ApplicationResources_zh-HK.properties" instead of
> > "ApplicationResources_zh_hk.properties".
> >
> > rana >> thanks!
> >
> > BTW, when i load the message resource file in UTF-8 formats, the browser
> > windows does not change the default encoding to UTF-8. I can see the
> > characters correctly if i manually switch the browser codeset.
> >
> > But when I added page contentType="text/html;charset=utf-8" or
> > "pageEncoding=utf-8" at JSP page directive, the characters become
> > unrecognized symbols. I also tried to include
> > contentType="text/html;charset=UTF-8" in controller element of
> > struts-config.xml. Not work neither.
> >
> > Any idea?
> >
> > Regards,
> > Eric
> >
> > ----- Original Message -----
> > From: "Vipul Sanghi" <vi...@zimono.com>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > Sent: Thursday, December 26, 2002 1:39 PM
> > Subject: RE: ApplicationResources
> >
> >
> > > The locale that you are specifying does not include the country
> extention.
> > > It only knows of zh because you are probably doing new Locale("zh").
> You
> > > have to use the country variant when you instantiate and set the
locale
> i
> > > think it is you have to do new Locale("zh", "hk") to pick traditional
> > > chinese etc.
> > >
> > > Vipul
> > >
> > > -----Original Message-----
> > > From: Eric Tse [mailto:erictks@netvigator.com]
> > > Sent: Thursday, December 26, 2002 11:27 AM
> > > To: Struts Users Mailing List
> > > Subject: ApplicationResources
> > >
> > >
> > > Dear all,
> > >
> > > I am trying to feed in 3 languages on my web, i.e. English (en-us),
> > > Traditional Chinese (zh-hk), and Simplified Chinese (zh-cn).
> > >
> > > I named the application resources as follows:
> > >
> > > ApplicationResources.properties           (for en-us)
> > > ApplicationResources_zh.properties          (for zh-hk)
> > >
> > > they work!! But when the following settings apply....
> > >
> > > ApplicationResources.properties           (for en-us)
> > > ApplicationResources_zh_hk.properties          (for zh-hk)
> > > ApplicationResources_zh_cn.properties          (for zh-cn)
> > >
> > > only en-us works! :~(
> > >
> > > any hint?
> > >
> > > Regards,
> > > eric
> > >
> > >
> > >
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <ma...@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <ma...@jakarta.apache.org>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: ApplicationResources in UTF-8

Posted by Dan Tran <da...@hotmail.com>.
This link works for me

http://www.anassina.com/struts/i18n/i18n.html

-D
----- Original Message -----
From: "Eric Tse" <er...@netvigator.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>;
<vi...@zimono.com>; <VE...@engr.sc.edu>
Sent: Friday, December 27, 2002 11:57 AM
Subject: ApplicationResources in UTF-8


> Hi Vipul,
>
> Thanks for your mail. I know what you mean. But even I tried to set the
> locale to hk, it works neither :)
>
> I know the root cause to my problem. The filename of application resource
> should be "ApplicationResources_zh-HK.properties" instead of
> "ApplicationResources_zh_hk.properties".
>
> rana >> thanks!
>
> BTW, when i load the message resource file in UTF-8 formats, the browser
> windows does not change the default encoding to UTF-8. I can see the
> characters correctly if i manually switch the browser codeset.
>
> But when I added page contentType="text/html;charset=utf-8" or
> "pageEncoding=utf-8" at JSP page directive, the characters become
> unrecognized symbols. I also tried to include
> contentType="text/html;charset=UTF-8" in controller element of
> struts-config.xml. Not work neither.
>
> Any idea?
>
> Regards,
> Eric
>
> ----- Original Message -----
> From: "Vipul Sanghi" <vi...@zimono.com>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> Sent: Thursday, December 26, 2002 1:39 PM
> Subject: RE: ApplicationResources
>
>
> > The locale that you are specifying does not include the country
extention.
> > It only knows of zh because you are probably doing new Locale("zh").
You
> > have to use the country variant when you instantiate and set the locale
i
> > think it is you have to do new Locale("zh", "hk") to pick traditional
> > chinese etc.
> >
> > Vipul
> >
> > -----Original Message-----
> > From: Eric Tse [mailto:erictks@netvigator.com]
> > Sent: Thursday, December 26, 2002 11:27 AM
> > To: Struts Users Mailing List
> > Subject: ApplicationResources
> >
> >
> > Dear all,
> >
> > I am trying to feed in 3 languages on my web, i.e. English (en-us),
> > Traditional Chinese (zh-hk), and Simplified Chinese (zh-cn).
> >
> > I named the application resources as follows:
> >
> > ApplicationResources.properties           (for en-us)
> > ApplicationResources_zh.properties          (for zh-hk)
> >
> > they work!! But when the following settings apply....
> >
> > ApplicationResources.properties           (for en-us)
> > ApplicationResources_zh_hk.properties          (for zh-hk)
> > ApplicationResources_zh_cn.properties          (for zh-cn)
> >
> > only en-us works! :~(
> >
> > any hint?
> >
> > Regards,
> > eric
> >
> >
> >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <ma...@jakarta.apache.org>
> > For additional commands, e-mail:
> <ma...@jakarta.apache.org>
> >
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


ApplicationResources in UTF-8

Posted by Eric Tse <er...@netvigator.com>.
Hi Vipul,

Thanks for your mail. I know what you mean. But even I tried to set the
locale to hk, it works neither :)

I know the root cause to my problem. The filename of application resource
should be "ApplicationResources_zh-HK.properties" instead of
"ApplicationResources_zh_hk.properties".

rana >> thanks!

BTW, when i load the message resource file in UTF-8 formats, the browser
windows does not change the default encoding to UTF-8. I can see the
characters correctly if i manually switch the browser codeset.

But when I added page contentType="text/html;charset=utf-8" or
"pageEncoding=utf-8" at JSP page directive, the characters become
unrecognized symbols. I also tried to include
contentType="text/html;charset=UTF-8" in controller element of
struts-config.xml. Not work neither.

Any idea?

Regards,
Eric

----- Original Message -----
From: "Vipul Sanghi" <vi...@zimono.com>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
Sent: Thursday, December 26, 2002 1:39 PM
Subject: RE: ApplicationResources


> The locale that you are specifying does not include the country extention.
> It only knows of zh because you are probably doing new Locale("zh").  You
> have to use the country variant when you instantiate and set the locale  i
> think it is you have to do new Locale("zh", "hk") to pick traditional
> chinese etc.
>
> Vipul
>
> -----Original Message-----
> From: Eric Tse [mailto:erictks@netvigator.com]
> Sent: Thursday, December 26, 2002 11:27 AM
> To: Struts Users Mailing List
> Subject: ApplicationResources
>
>
> Dear all,
>
> I am trying to feed in 3 languages on my web, i.e. English (en-us),
> Traditional Chinese (zh-hk), and Simplified Chinese (zh-cn).
>
> I named the application resources as follows:
>
> ApplicationResources.properties           (for en-us)
> ApplicationResources_zh.properties          (for zh-hk)
>
> they work!! But when the following settings apply....
>
> ApplicationResources.properties           (for en-us)
> ApplicationResources_zh_hk.properties          (for zh-hk)
> ApplicationResources_zh_cn.properties          (for zh-cn)
>
> only en-us works! :~(
>
> any hint?
>
> Regards,
> eric
>
>
>
>
>
> --
> To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
> For additional commands, e-mail:
<ma...@jakarta.apache.org>
>


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: ApplicationResources

Posted by Vipul Sanghi <vi...@zimono.com>.
The locale that you are specifying does not include the country extention.
It only knows of zh because you are probably doing new Locale("zh").  You
have to use the country variant when you instantiate and set the locale  i
think it is you have to do new Locale("zh", "hk") to pick traditional
chinese etc.

Vipul

-----Original Message-----
From: Eric Tse [mailto:erictks@netvigator.com]
Sent: Thursday, December 26, 2002 11:27 AM
To: Struts Users Mailing List
Subject: ApplicationResources


Dear all,

I am trying to feed in 3 languages on my web, i.e. English (en-us),
Traditional Chinese (zh-hk), and Simplified Chinese (zh-cn).

I named the application resources as follows:

ApplicationResources.properties           (for en-us)
ApplicationResources_zh.properties          (for zh-hk)

they work!! But when the following settings apply....

ApplicationResources.properties           (for en-us)
ApplicationResources_zh_hk.properties          (for zh-hk)
ApplicationResources_zh_cn.properties          (for zh-cn)

only en-us works! :~(

any hint?

Regards,
eric





--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>