Try this...

<tr>
        <td><bean:message key="logon.jsp.username" />:</td>
        <td><html:text property="username" size="15" maxlength="15" /></td>
</tr>
<tr>
        <td><html:errors property="username" /></td>
</tr>

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 8:39 PM
To: Struts Users Mailing List
Subject: RE: Show validation error messages next to the corresponding
inpu t fields






Thanks Vishu,

But my question is that how to put the error messages in the location next
to their input fields. Something like this:


User name: (input box for user name)

First name: (input box for first name)

*Error: Last name can't be empty.
Last name:(input box for last name)

....
*Error: invalid credit card number.
Credit Card Number (input box for credit card number)

......

Thanks,
kevin



                                                                                       
                                                
                      "Ghanakota,                                                      
                                                
                      Vishu"                   To:       "'Struts Users Mailing List'" 
<[EMAIL PROTECTED]>                
                      <[EMAIL PROTECTED]        cc:                                    
                                                 
                      stam.com>                Subject:  RE: Show validation error 
messages next to the corresponding inpu t fields    
                                                                                       
                                                
                      11/12/2003 08:26                                                 
                                                
                      PM                                                               
                                                
                      Please respond to                                                
                                                
                      "Struts Users                                                    
                                                
                      Mailing List"                                                    
                                                
                                                                                       
                                                




use the "errors" tag under html taglib. When you instantiate an ActionError
and add it to ActionErrors, you can specify a key, which can be linked to
an
entry in ResourceBundle. "errors" tag will pick that up. you can also use
html formatting around the entry in ResourceBundle, so it can go with rest
of your formatting.

-----Original Message-----
From: Kevin Wang [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 12, 2003 6:23 PM
To: Struts Users Mailing List
Subject: Show validation error messages next to the corresponding input
fields






Does anybody know how to do this? I know I can get ActionErrors which is an
array of messages.. but is there a way I can put the messages in place with
their input fields?

Thanks.




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


"MMS <firstam.com>" made the following
 annotations on 11/12/2003 06:26:48 PM
------------------------------------------------------------------------------

"THIS E-MAIL MESSAGE AND ANY FILES TRANSMITTED HEREWITH, ARE INTENDED
SOLELY FOR THE USE OF THE INDIVIDUAL(S) ADDRESSED AND MAY CONTAIN
CONFIDENTIAL, PROPRIETARY OR PRIVILEGED INFORMATION.  IF YOU ARE NOT THE
ADDRESSEE INDICATED IN THIS MESSAGE (OR RESPONSIBLE FOR DELIVERY OF THIS
MESSAGE TO SUCH PERSON) YOU MAY NOT REVIEW, USE, DISCLOSE OR DISTRIBUTE
THIS MESSAGE OR ANY FILES TRANSMITTED HEREWITH.  IF YOU RECEIVE THIS
MESSAGE IN ERROR, PLEASE CONTACT THE SENDER BY REPLY E-MAIL AND DELETE THIS
MESSAGE AND ALL COPIES OF IT FROM YOUR SYSTEM."
==============================================================================



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




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


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

Reply via email to