jakarta-taglibs-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Marius Scurtescu <mar...@multiactive.com>
Subject Re: [VOTE] i18n taglib release
Date Tue, 13 Mar 2001 20:25:04 GMT
Hi,

I had a brief look at the taglib and here 
are my comments:

1. I don't think you should rely on log4j. None
of the other taglibs do and it is an unnecessary
dependency. You can use:
  pageContext.getServletContext().log(...)

It may not be as versatile as log4j, but it is more
than enough for this taglib.

2. There should be other ways to set the locale.
Relying on the browser settings should be only one
of them.

In many applications the user explicitly
chooses a language/locale and this setting is
stored in the session. You should be able to
set the locale based on such a setting.

3. Both LocaleHelper and ResourceHelper are
derived from BodyTagSupport. This dependency
is not needed and these classes are not
tags.

4. The bundle name can be either set explicitly
or it will be retrieved from an attribute/environment.

May be the attribute and the environment names
should be set explicitly as well instead of using
hard coded values. This will make the JSP page
more readable as well.


I will implement 1 and 2 for my own use and I
can send you the code if you are interested.

Marius
Tim Dawson wrote:
> 
> I've made the update from the one comment that I received back - thanks to
> Wong Kok Wai and Craig McClanahan for the feature and implementation
> suggestions.
> 
> Now there are three ways to set the resource bundle name (in this order of
> priority):
> 1. directly in the tag (necessary if using more than one bundle in a web
> app)
> 2. in an application-scoped attribute, as set in a load-on-startup servlet
> 3. in an environment variable set in the deployment descriptor
> 
> I don't know if its kosher for me to call a vote since I'm not a committer,
> but I'd like to get this finalized so my company can move forward with the
> comfort of knowing we're using a standard taglib! :-)
> 
> Tim
> 
>   ------------------------------------------------------------------------------------------------------------------------------------
>                Name: i18n.zip
>    i18n.zip    Type: Zip Compressed Data (application/x-zip-compressed)
>            Encoding: base64

-- 
------------------
Marius Scurtescu, Software Engineer
Tel: (604) 899-2835 Fax: (604) 899-2899
mailto:marius@multiactive.com
Multiactive Software Inc. http://www.multiactive.com
------------------
Attract and retain customers with Multiactive Software --
proud winners of PC WEEK's "Best of COMDEX" award.
------------------

Mime
View raw message