Marcel,
I suppose you carefully checked the case & spelling of the keys in
your action class with the values in ApplicationResources.properties?
One mistake I made in ApplicationResources.properties was like in the
next line. (There is no equals sign in it).

UserValidator.userID.must.be.entered<li>User ID must be entered</li>

it should be

UserValidator.userID.must.be.entered=<li>User ID must be entered</li>
========
I'm very new to struts but I can't see why it pretends there is no
message when the key doesn't match. I wish it would return the
look-up key instead, that's more meaningful to a user & easier for me
to debug.

Keith.


--- "MacKellar, Kimberly" <[EMAIL PROTECTED]> wrote:
> Are all of your errors defined in the
> ApplicationResources.properties?
> 
> Kim MacKellar
> 
> -----Original Message-----
> From: Marcel Andres [mailto:[EMAIL PROTECTED]]
> Sent: Monday, September 10, 2001 10:06 AM
> To: struts-user
> Subject: Does <html:errors> not work proper?
> 
> 
> Hi there
> 
> Like most of you, I am using the <html:errors>-tag to show errors
> on the JSP
> page. My problem is, that I don't get any message on the JSP page.
> I do the
> following check before I return to the form:
> 
> if (!errors.empty()) {
>       saveErrors(request, errors);
>       return (new ActionForward(mapping.getInput()));
> }
> 
> When I check the values, "errors.empty()" it is set to false, and
> the value
> for "errors.size()" is 1.
> 
> On the JSP, I am using a template with header, main, and footer. In
> the
> header I declared this:
> 
> <%@ page language="java" %>
> <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
> <%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
> 
> ....
> 
> <!----- Handling the Errors ----->
> <table border="0" cellspacing="0" cellpadding="0" width="100%"
> height="18">
>  <tr>
>   <font class="error">
>    <html:errors/>
>   </font>
>  </tr>
> </table>
> 
> 
> Any comments would be appreciated.
> 
> Marcel


__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com

Reply via email to