How to validate text field with JSP

Discussion in 'Java' started by shyam shukla, May 14, 2004.

  1. shyam shukla

    shyam shukla Guest

    Dear All,

    I have created a application using JSP/HTML as a front end and
    MS-Access as a Back End with JRun as an application server.I am not
    able to prompt the user if any text field is left blank.
     
    shyam shukla, May 14, 2004
    #1
    1. Advertising

  2. On 13 May 2004 23:24:20 -0700, shyam shukla wrote:

    > I have created a application using JSP/HTML as a front end and
    > MS-Access as a Back End with JRun as an application server.


    URL? Has it gone public yet (ever?),
    or is it just local?

    >..I am not
    > able to prompt the user if any text field is left blank.


    That is very vague (not exact, no detail).
    <http://www.physci.org/codes/javafaq.jsp#specific>
    <http://www.physci.org/codes/javafaq.jsp#exact>

    ....
    It is possible you need to validate on the server
    and return a page to the user showing them what
    information is missing or invalid.

    You could also do it entirely on the client-side
    using Javascript, but since you need (usually) a
    pure HTML fall-back, delivering the information to
    the server for valifation is the usual way,
    as far as I understand.

    HTH

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
     
    Andrew Thompson, May 14, 2004
    #2
    1. Advertising

  3. shyam shukla

    Johan Poppe Guest

    shyam shukla skrev:

    >Dear All,
    >
    >I have created a application using JSP/HTML as a front end and
    >MS-Access as a Back End with JRun as an application server.I am not
    >able to prompt the user if any text field is left blank.


    If you want that to happen client-side, you need javascript. See an
    appropriate newsgroup for details.

    As some users may have javascript turned off, you should have a
    server-side check as well. That's simply a question of getting the
    value of that textfield from the Request object, checking if it's an
    empty string, and returning an appropriate error message to the
    client/user if so.

    --
    Riktig sitering gjør meldingene dine lettere å lese:
    < url: http://home.online.no/~vidaandr/news/OBSquoting.html >
     
    Johan Poppe, May 14, 2004
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Arnold Peters
    Replies:
    1
    Views:
    1,544
    Tomer Ben-David
    Oct 27, 2004
  2. Replies:
    0
    Views:
    4,403
  3. Sébastien de Mapias
    Replies:
    5
    Views:
    466
    Dave Miller
    May 26, 2009
  4. Mike
    Replies:
    5
    Views:
    111
    Janwillem Borleffs
    Dec 1, 2003
  5. Eddie

    validate a text input field. (again)

    Eddie, Dec 6, 2003, in forum: Javascript
    Replies:
    13
    Views:
    204
    Dr John Stockton
    Dec 11, 2003
Loading...

Share This Page