I assume that you are returning something like this
from your validate method.

ActionErrors errors = new ActionErrors();
errors.add("firstName", new
ActionError("regForm.firstName");

return errors;

Then all you would have to do is use the html:errors
tag.

<html:errors/> 

Of course making sure the html tags are defined at the
top of your JSP page.

I've been doing some validation work if you want to
look at what I've done, but it is a framework so there
aren't any simple, basic, Struts examples on my site. 

http://home.earthlink.net/~dwinterfeldt

The main Struts example is good basic example, but I
assume you've looked at that.


David

--- "Tong, Tom" <[EMAIL PROTECTED]> wrote:
> Hello,
>  
> I am new to Struts and just trying to use validate()
> function. I followed
> the struts-example and made my validation
> implementation. My validation is
> working (I can't leave my page if I gave an
> invalided input), however, I
> can't get the error message showing. Of course I
> have my messages in my
> ApplicationResources.property file.
>  
> Is there anyone can give me some hints to find out
> my problem? 
>  
> Great thanks in advance,
>  
> Tom
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Reply via email to