I'd have to say both, you want to check the fields with JavaScript to give
the user the fastest response, but since all browsers don't support
JavaScript, you'll want to re-check the fields in your servlet to prevent
crashes.
    (*Chris*)

----- Original Message -----
From: Alvaro Fuentes <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, April 22, 1999 1:06 AM
Subject: User Error Handling


> I've got two questions about user introduced data error handling...
>
> First, where is the best place to detect these errors? javascript or
> servlet code?
> For example, if I have a field where users put their telephone number,
> where should I check if the data is correct?
> It's faster with JavaScript, but servlet correctness would depend on the
> HTML page.
> I would like to know what solutions are you using.
>
> second, I have two servlets, one (say dataServlet) generating a HTML
> form and a second getting this form's data and making some jdbc
> operations with them (say jdbcServlet). If there's a database error, I
> would like to show the first HTML form with a message showing what
> happened. At this moment I am generating the same HTML form with
> jdbcServlet, but I think it should be easier (and more ellegant) to call
> dataServlet's service(), but I would need to re-define
> HttpServletRequest to add an 'error-cause' parameter. Is it possible to
> make this? How?
>
> Thanks in advance.
>
>
___________________________________________________________________________
> 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

Reply via email to