You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Simon MARTIN <si...@gmx.at> on 2005/03/05 15:14:42 UTC
Key from ressource bundle not fount in , but found in
ActionMessage
Hi,
my entry from the ressource bundle is found pretty well when I use it like this:
if (username == null || username.equals(""))
errors.add("username", new ActionMessage("loginForm.username.empty"));
However, if I want to use the localized entries in a JSP directly, it does not work:
<fmt:message key="loginForm.username.empty" />
... only gives me
???loginForm.username.empty???
How is this possible?
When it comes to the Validator plugin, <html:errors> and <html:javascript> can't
find the entries as well.
Lots of thanks in advance and kind regards,
Simon
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: Key from ressource bundle not fount in , but found in ActionMessage
Posted by Jeff Beal <jb...@gmail.com>.
The <fmt:message> tag is part of the JSTL library, not the Struts
library, and has its own mechanism for specifying resource bundles.
See the JSTL documentation for the <fmt:bundle> tag for details.
-- Jeff
On Sat, 05 Mar 2005 15:14:42 +0100, Simon MARTIN <si...@gmx.at> wrote:
> Hi,
>
> my entry from the ressource bundle is found pretty well when I use it like this:
>
> if (username == null || username.equals(""))
> errors.add("username", new ActionMessage("loginForm.username.empty"));
>
> However, if I want to use the localized entries in a JSP directly, it does not work:
>
> <fmt:message key="loginForm.username.empty" />
>
> ... only gives me
>
> ???loginForm.username.empty???
>
> How is this possible?
>
> When it comes to the Validator plugin, <html:errors> and <html:javascript> can't
> find the entries as well.
>
> Lots of thanks in advance and kind regards,
> Simon
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
--
Jeff Beal
Webmedx, Inc.
Pittsburgh, PA USA
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org