Of course you need to validate on the server as well, but, if the client
validates first the server validation is *much* cheaper, since the cost is
*not* in the validation it's in the round trip.
If the client is able to catch 50% of the errors (and it's more likely in
this case to be >90%) then that reduces round-trips back from the server to
report a simple error.
Always (if possible) validate as close to the source of error as possible,
if you can use JS on the client, do so. You still have to check on the
server, but the cost of checking is in the noise compared to the cost of a
roundtrip if the validation fails on the server,
Kevin Jones
DevelopMentor
www.develop.com
> -----Original Message-----
> From: A mailing list for discussion about Sun Microsystem's Java Servlet
> API Technology. [mailto:[EMAIL PROTECTED]]On Behalf Of
> BERWART Thierry
> Sent: 09 April 2001 07:53
> To: [EMAIL PROTECTED]
> Subject: Re: How can I catch an JSP error ????
>
>
> yes you're right !
>
> -----Message d'origine-----
> De : Christopher K. St. John [mailto:[EMAIL PROTECTED]]
> Envoyé : vendredi 6 avril 2001 22:51
> À : [EMAIL PROTECTED]
> Objet : Re: How can I catch an JSP error ????
>
>
> Mark Galbreath wrote:
> >
> > Everyone (beginning with me) is telling him to use JavaScript. He
> > says (privately to me) that his boss insists that validation take
> > place on the server (typical boss - probably from Marketing).
> >
>
> Even if you use Javascript to validate on the client side,
> you still have to re-validate on the server-side. Client
> side validation just speeds up feedback, it doesn't
> guarantee clean data. (Eg, the user has Javascript turned
> off, the user posts the data using a tool other than a web
> browser, etc, etc, etc)
>
>
> --
> Christopher St. John [EMAIL PROTECTED]
> DistribuTopia http://www.distributopia.com
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
>
> __________________________________________________________________
> _________
> To unsubscribe, send email to [EMAIL PROTECTED] and include
> in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html