An additional concern for browser based clients is that there's usually no
way to ensure that the client code will be executed at all; no guarantees
that JavaScript and/or Java applets are enabled. In an Intranet you may have
some control over this, but never on the Internet.
So even if you do validation on the client (for a more user-friendly interface),
you have to do it on the server as well.
Robert Anglos wrote:
>
> My comments relate to the Server vs Client side validation
>
> My background includes several years of Forte, which is a three tier client/server
> environment and language (similar to Java). As such we have had to deal with the
> issue outlined in your question and I am giving you the take that we use with
> Forte.
>
> Some of the considerations that we take into account when deciding where to place
> the processing, in this case the validation, is
> - how complex is the validation, if simple let the client side handle it.
> - where is the processing power (if it is anticipated that the client machine may
> be heavily utilized put it on the server.
> - Likewise if the server is heavily utilized you may what to move it, or a portion,
> to the client.
> - The amount of data required to do the validation (i.e. if you have to pass lots
> of data to the client do not do it)
> relates to network traffic and speed to load the page.
> - What is the being validated (i.e. do not validate the user id/password at the
> client side)
> - To add some context to using this information Forte has a client side event
> handler. Thus there is no issues with having anything other than the native Forte
> on the client.
> - One thing that can be done in Forte, that I will try in the Java/JSP, is... Forte
> widgets have an object, that is similar to a vector, such that when the user
> selects a value (i.e. from a drop list) an associated value is used. (i.e. if the
> user was selecting 'U.S.A.' from a countries drop list the value that would be
> transferred to a 'record' would be 1). This could probably be accomplished using
> beans.
>
> I have done something similar, to the above, using servlets, though not in the same
> event driven manor, but not on the client side. Perhaps someone could comment more
> on that side.
>
> Robert
>
> Heske Chris wrote:
>
> > What is the generally accepted way of performing HTML field validation
> > using JSPs. Is it better done in JavaScript because it's performed
> > client side?
> >
> > Thanks in advance.
> >
> > Cheers,
> > Chris
--
Hans Bergsten [EMAIL PROTECTED]
Gefion Software http://www.gefionsoftware.com
===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
FAQs on JSP can be found at:
http://java.sun.com/products/jsp/faq.html
http://www.esperanto.org.nz/jsp/jspfaq.html