aspose file tools*
The moose likes Spring and the fly likes spring mvc - jsr 303, handling error level messages Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "spring mvc - jsr 303, handling error level messages" Watch "spring mvc - jsr 303, handling error level messages" New topic
Author

spring mvc - jsr 303, handling error level messages

gianluca gian
Ranch Hand

Joined: Aug 14, 2009
Posts: 31
hello, actually I'm using jsr 303 feature to validate user input and on jsp page I'm using Spring library to display error messages. This is my validator class:



on the jsp i'm displaying error messages with spring like:



I'm looking a way to set on the validator code, some king of "flag" that could bring to client side, the the error level severity information (error, warning, info), so that I could style messages on jsp with different colour (es. red for error level, blue for warning one). Could you please help me? thank you
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1672
    
    7

This is really for validation which is by definition an error maybe use redirect attributes instead.



[How To Ask Questions][Read before you PM me]
gianluca gian
Ranch Hand

Joined: Aug 14, 2009
Posts: 31
hello, at the end I resolved in this way, inside validator:



and within jsp:



not sure if it is formally correct. Thnak u. Bye
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: spring mvc - jsr 303, handling error level messages