Checked.....  it's there.  I seem to remember a post sometime ago about
having to specify locale= , but can't seem to remember where it needs to be
coded.  I went to check the archives about an hour ago and couldn't get into
'em.  Anybody else remember something about this?

Jerry

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 2:28 PM
> To: [EMAIL PROTECTED]
> Subject: RE: <html:errors/> not displaying message?
> 
> 
> Could just not be finding your properties file...
> 
> Should be in: 
> /classes/com/labone/Messages/ApplicationResources.properties
> 
> 
> 
> -----Original Message-----
> From: Jerry.Jalenak [mailto:[EMAIL PROTECTED]]
> Sent: Tuesday, August 20, 2002 3:02 PM
> To: struts-user
> Subject: RE: <html:errors/> not displaying message?
> 
> 
> OK, should've caught that one.  Also had a finger-check in the 
> ActionForm
> where I'm setting the error message.  Fixed 'em both.  Now 
> I'm getting a
> message on the logon.jsp, but it looks like this:
> 
>               ???en_US.error.bad.userid??? 
> 
> I'm guessing it has something to do with localization?  Ideas? 
> 
> Jerry
> 
> > -----Original Message-----
> > From: Kamholz, Keith (corp-staff) USX [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 20, 2002 1:44 PM
> > To: 'Struts Users Mailing List'
> > Subject: RE: <html:errors/> not displaying message?
> > 
> > 
> > For your <html:errors/> tag, don't specify the name 
> > attribute.  Specify the
> > property attribute instead.  It would look like:
> > <html:errors property="userID" />
> > 
> > I hope this helps ya out.
> > 
> > ~ Keith
> > http://www.buffalo.edu/~kkamholz
> > 
> > 
> > 
> > -----Original Message-----
> > From: Jerry Jalenak [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, August 20, 2002 2:41 PM
> > To: '[EMAIL PROTECTED]'
> > Subject: <html:errors/> not displaying message?
> > 
> > 
> > I'm putting together a very basic, sample application for 
> > some training
> > purposes using Struts 1.1b2.  In testing the app, I cannot 
> > seem to get an
> > error message from an ActionForm to display on the jsp.  Can 
> > someone see
> > what the heck I'm doing wrong?
> > 
> > struts-config.xml
> > 
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> > <!DOCTYPE struts-config PUBLIC "-//Apache Software 
> > Foundation//DTD Struts
> > Configuration 1.1//EN"
> > "http://jakarta.apache.org/struts/dtds/struts-config_1_1.dtd";>
> > 
> > <struts-config>
> > 
> >     <form-beans>
> >             <form-bean name="LogonBean"
> > type="com.labone.LogonBean" />
> >     </form-beans>
> >     
> >     <action-mappings>
> >             <action path="/LogonAction"
> > type="com.labone.LogonAction"
> >                             name="LogonBean"
> >                             input="/logon.jsp"
> >                             scope="request"
> >                             validate="true">
> >                     <forward name="OK"      path="/display.jsp" />
> >                     <forward name="NOK"     path="/logon.jsp" />
> >             </action>
> >     </action-mappings>
> >     
> >     <message-resources
> > parameter="com.labone.Messages.ApplicationResources" />
> >     
> > </struts-config>
> > 
> > LogonBean.java
> > 
> > package com.labone;
> > 
> > import javax.servlet.http.HttpServletRequest;
> > 
> > import org.apache.struts.action.ActionError;
> > import org.apache.struts.action.ActionErrors;
> > import org.apache.struts.action.ActionForm;
> > import org.apache.struts.action.ActionMapping;
> > 
> > public class LogonBean extends ActionForm
> > {
> >     private String userID;
> >     
> >     public LogonBean()
> >     {
> >             this.userID = "";
> >     }
> >     
> >     public String getUserID()
> >     {
> >             return this.userID;
> >     }
> >     
> >     public void setUserID(String userID)
> >     {
> >             this.userID = userID;
> >     }
> >     
> >     public ActionErrors validate(ActionMapping mapping,
> > HttpServletRequest request)
> >     {
> >             ActionErrors errors = new ActionErrors();
> >             
> >             if ((!userID.equals ("Jerry")) && 
> > (!userID.equals ("Qing")))
> >             {
> >                     errors.add(ActionErrors.GLOBAL_ERROR, new
> > ActionError("userID", "error.bad.userid"));
> >             }
> > 
> >             return errors;
> >     }
> > }
> > 
> > ApplicationResources.properties
> > 
> > errors.header=
> > errors.footer=
> > 
> > error.bad.userid = Unknown User ID!!!!
> > 
> > logon.jsp
> > 
> > <%@ taglib uri="/bean"              prefix="bean"           %>
> > <%@ taglib uri="/display"   prefix="display"        %>
> > <%@ taglib uri="/html"              prefix="html"           %>
> > <%@ taglib uri="/logic"             prefix="logic"          %>
> > <%@ taglib uri="/nested"    prefix="nested" %>
> > <%@ taglib uri="/tiles"             prefix="tiles"          %>
> > 
> > <html>
> >     <head>
> >             <title>This is a test web application</title>
> >     </head>
> >     <body>
> >             <table border=0>
> >                     <html:form action="LogonAction.do" 
> > method="POST">
> >                     <tr>
> >                             <td>
> >                                     User ID:
> >                             </td>
> >                             <td>
> >                                     <html:text maxlength="10"
> > property="userID" size="10" />
> >                             </td>
> >                             <td>
> >                                     <html:errors name="userID"/>
> >                             </td>
> >                     </tr>
> >                     <tr>
> >                             <td colspan=3>
> >                                     <html:submit/>
> >                             </td>
> >                     </tr>
> >                     </html:form>
> >             </table>
> >     </body>
> > </html>
> > 
> > 
> > Aughhhhhhhhhh!
> > 
> >     
> > 
> > Jerry Jalenak
> > Web Publishing
> > LabOne, Inc.
> > 10101 Renner Blvd.
> > Lenexa, KS  66219
> > (913) 577-1496
> > [EMAIL PROTECTED]
> > 
> > 
> > This transmission (and any information attached to it) may be 
> > confidential
> > and is intended solely for the use of the individual or 
> > entity to which it
> > is addressed. If you are not the intended recipient or the person
> > responsible for delivering the transmission to the intended 
> > recipient, be
> > advised that you have received this transmission in error and 
> > that any use,
> > dissemination, forwarding, printing, or copying of this 
> information is
> > strictly prohibited. If you have received this transmission 
> > in error, please
> > immediately notify LabOne at (800)388-4675.
> > 
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> > --
> > To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> 
> 
> This transmission (and any information attached to it) may be 
> confidential and is intended solely for the use of the individual or 
> entity to which it is addressed. If you are not the intended 
> recipient 
> or the person responsible for delivering the transmission to the 
> intended recipient, be advised that you have received this 
> transmission 
> in error and that any use, dissemination, forwarding, printing, or 
> copying of this information is strictly prohibited. If you 
> have received 
> this transmission in error, please immediately notify LabOne at 
> (800)388-4675.
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: 
> <mailto:[EMAIL PROTECTED]>
> 
> 

This transmission (and any information attached to it) may be confidential and is 
intended solely for the use of the individual or entity to which it is addressed. If 
you are not the intended recipient or the person responsible for delivering the 
transmission to the intended recipient, be advised that you have received this 
transmission in error and that any use, dissemination, forwarding, printing, or 
copying of this information is strictly prohibited. If you have received this 
transmission in error, please immediately notify LabOne at (800)388-4675.



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

Reply via email to