my dog learned polymorphism
The moose likes JSP and the fly likes Displaying an inline error message in a JSP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Head First Android this week in the Android forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Displaying an inline error message in a JSP" Watch "Displaying an inline error message in a JSP" New topic
Author

Displaying an inline error message in a JSP

Jahnavi Kondapaneni
Ranch Hand

Joined: Jan 25, 2008
Posts: 56
Hi all,

Can anybody help me out in displaying an inline error message in a JSP instead of using displaying alerts using Javascript.
Thanks in advance


Regards
Janu
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1508
    
    5

You might use inline style sheet for this, in the following example if you leave the text field blank it will display an error message, and once again when the text field gets the focus that message will disappear



Swastik
Jahnavi Kondapaneni
Ranch Hand

Joined: Jan 25, 2008
Posts: 56
Swastik,

Thank you.
Your code is working....
But I want to know what is the use of <fmt> tag .
Swastik Dey
Rancher

Joined: Jan 08, 2009
Posts: 1508
    
    5

Its a part of JSTL and can be used to display any formatted output for e.g



You can also set the date patterns, time zone etc.
 
 
subject: Displaying an inline error message in a JSP
 
It's not a secret anymore!