tomcat-taglibs-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Cindy Nordahl" <cindy_nord...@hotmail.com>
Subject <requestEncoding> tag
Date Wed, 19 Dec 2001 06:04:39 GMT
The <fmt:requestEncoding value="UTF-8" /> tag performs the same function as 
the following:

<%@ page contentType="text/html;charSet=UTF-8" %>

right?

So, was this tag added to clean it up a little and make it less confusing to 
the page designer?

Thanks,

Cindy


>From: Jan Luehe <Jan.Luehe@Sun.COM>
>Reply-To: Jan Luehe <Jan.Luehe@Sun.COM>
>To: coder@cindytech.com
>CC: taglibs-user@jakarta.apache.org
>Subject: Re: I18N <messageArg> tag
>Date: Tue, 18 Dec 2001 09:59:39 -0800 (PST)
>
>Cindy:
>
>
> > I'm trying to figure out <messageArg> tag.  The specs say, "If the 
>message
> > corresponding to the given key is compound, that is, contains one or 
>more
> > variables, it can be supplied with argument values for these variables 
>by
> > using a <messageArg> subtag for each argument value"
> >
> > The example in the specs:
> >
> >     <fmt:message key="Welcome">
> >       <fmt:messageArg value="$dateArg"/>
> >     </fmt:message>
> >
> > Does this mean that the 'Welcome' key contains more than one value?  Is 
>the
> > <messageArg> tag printing a date that is grabbed from the resource 
>bundle?
>
>In the above example, the message key "Welcome" could have been mapped
>to a message of the following form:
>
>   Welcome! Today's date: {0}
>
>which would have been looked up in the appropriate resource bundle.
>
>"{0}" is a placeholder that gets replaced with the argument value
>supplied by the <messageArg> action, in this case, the date
>stored in the scoped attribute named "dateArg".
>
> > Welcome = "welcome"
> > Welcome.dateArg = "Monday, January 2nd, 2002"
> >
> > But, it's not because the '$dateArg' is a scoped variable.
>
>No. Another way of achieving the same result would have been:
>
>   <fmt:message key="Welcome">
>    <fmt:messageArg>
>     <fmt:formatDate/>
>    </fmt:messageArg>
>   </fmt:message>
>
> > So, why bother with the messageArg tag?
>
>There's a good tutorial section on formatting compound messages at
>
>   http://java.sun.com/docs/books/tutorial/i18n/format/messageintro.html
>
>Let me know if that still leaves any questions you might have open.
>
>
>Jan
>
>


_________________________________________________________________
MSN Photos is the easiest way to share and print your photos: 
http://photos.msn.com/support/worldwide.aspx


--
To unsubscribe, e-mail:   <mailto:taglibs-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:taglibs-user-help@jakarta.apache.org>


Mime
View raw message