Anyway, I would keep validation code out of the JSP page.

Let's imagine you are creating an invoice with the data the user entered.
You could then use the object constructor to do the validation (this would
be a very smart thing to do, as it would enforce validation throughout the
whole application and all other uses of the class, if any) and raise an
exception accordingly. You could then catch the exception and display an
adequate message.

Even if you use JavaScript to do some validation, keep in mind that it can
be turned off. Server validation is mandatory in ANY important form.

----- Original Message -----
From: "Suresh kumar K Badiga" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, October 04, 2000 4:55 AM
Subject: Field Validations....


> Hi All
>
> Using JSP how to do Field Validations like in my JSP(Html) page some text
> fields are there some will except only characters and some only
numbers.How
> to do this validations. I know one thing using JAVASCRIPT we can do this
> validations. Is the only way or any other way is there using JSP.
>
> -Suresh
>
>
===========================================================================
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to