Re: JSTL resource bundle issue

2005-12-23 Thread hong yuan
I have the following case: 
(1) I have an framework application which has
framework resource bundle which sits in a jar file and
also some framework jsps like header / footer etc.. 
(2) I have an application which uses the framework jar
file and copies the framework jsp files over and has
its own resource bundle.

Can I do the following:
For (1), I won't register the resource bundle in
web.xml but use fmt:bundle tags.
For (2), I will register the application resource
bundle in its web.xml file so that I don't need to use
fmt:bundle on each fmt:message call.

Thanks a lot.

--- Rahul Akolkar [EMAIL PROTECTED] wrote:

 On 12/23/05, hong yuan [EMAIL PROTECTED] wrote:
  Hi, I am using JSTL resource bundle. It is defined
 in
  web.xml:
 
  context-param
   param-name
 javax.servlet.jsp.jstl.fmt.localizationContext
   /param-name
   param-value
 package.ApplicationResources
   /param-value
  /context-param
 
  My question is that if I have two or more resource
  bundle properties such as
  ApplicationResourcesBase.properties,
  ApplicationResourcesApp.properties, how do I
 regiester
  them in web.xml, and how do I call it in my JSP
 using
  fmt tag?
 
 snip/
 
 I wouldn't recommend defining resource bundles in
 the web.xml. We have
 perfectly usable fmt:bundle and fmt:setBundle tags
 in the JSTL format
 taglib. Please use those instead, and you won't have
 this issue -- you
 can have as many bundles as you want, and you can
 pick one at any
 point in time.
 
 -Rahul
 
 
  Thanks,
  Hong
 
 
 

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




__ 
Yahoo! DSL – Something to write home about. 
Just $16.99/mo. or less. 
dsl.yahoo.com 


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



Re: JSTL resource bundle issue

2005-12-23 Thread Rahul Akolkar
On 12/23/05, hong yuan [EMAIL PROTECTED] wrote:
 I have the following case:
 (1) I have an framework application which has
 framework resource bundle which sits in a jar file and
 also some framework jsps like header / footer etc..
 (2) I have an application which uses the framework jar
 file and copies the framework jsp files over and has
 its own resource bundle.

 Can I do the following:
 For (1), I won't register the resource bundle in
 web.xml but use fmt:bundle tags.
 For (2), I will register the application resource
 bundle in its web.xml file so that I don't need to use
 fmt:bundle on each fmt:message call.
snip/

For both, look at fmt:setBundle. Put the bundle in the scope of
choice, and you won't need a fmt:bundle wrapper for each fmt:message
tag (use the tag's bundle attribute).

-Rahul



 Thanks a lot.

snap/

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