Hi,

   Something simillar happens to me when i started with Struts 2. I use
appfuse and I realized that a message displays just above the field I'd
validated, and where I included a messages.jsp (this jsp displays the action
and error messages), usually at the top of the html page.

   To solve this I supressed the field messages (those that are displayed
above the field) rewriting the tag templates. Struts gives you the chance to
override the templates they provide. I created a tree at WEB-INF level just
like they are in the struts2-core library (template/css_xhtml/...). The
files you put there will overwrite the Struts2 ones, and change the default
behaviour of the tags.

Regards.


Johnson nickel wrote:
> 
> Hi Friends,
> 
> I am using Struts 2 application for my project. Before I was used Struts 1
> when compare to this
> 
> Struts 2 is reduced lot of configuration problems. I have use the
> Annotation validation to validate the
> Username and password fields in my Login page.
> 
> Code:
>      
>    
> @RequiredFieldValidator(type=ValidatorType.SIMPLE,fieldName="username",message="UserName
> is required")
>         public String getUsername() {
>           return username;
>        }
> 
> 
> 
> Same as For password also ,
> 
> When i have submit the Login button, the Error messages is displaying
> Repeated. I have spend lot of time
> on this issue. Can u anybody give me the solution.
> 
> Thanks and Regards,
> Johnson
> 

-- 
View this message in context: 
http://www.nabble.com/Error-messages-is-repeated-Using-Struts-2-Annotation-validation-tp15157319p15160651.html
Sent from the Struts - User mailing list archive at Nabble.com.


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

Reply via email to