servlets: how to notify of failed validation

Discussion in 'Java' started by dave, Jul 14, 2004.

  1. dave

    dave Guest

    Here's what i want to do in most efficient way possible.

    I have 1> an html form that asks for an integer. 2> If not an integer, I
    want to create, like in a lot of commercial websites, a refresh of that same
    page with red letters saying "Sorry this number is not an integer please try
    again". Instead of creating like 3 servlets, how do i do this with one?


    ---
    Outgoing mail is certified Virus Free.
    Checked by AVG anti-virus system (http://www.grisoft.com).
    Version: 6.0.719 / Virus Database: 475 - Release Date: 7/12/04
    dave, Jul 14, 2004
    #1
    1. Advertising

  2. dave

    Bryce Guest

    On Wed, 14 Jul 2004 18:30:31 GMT, "dave"
    <> wrote:

    >Here's what i want to do in most efficient way possible.
    >
    >I have 1> an html form that asks for an integer. 2> If not an integer, I
    >want to create, like in a lot of commercial websites, a refresh of that same
    >page with red letters saying "Sorry this number is not an integer please try
    >again". Instead of creating like 3 servlets, how do i do this with one?


    JSP

    Have JSP look for ErrorList or something in session.

    If not there, don't do anything.

    If there, make red letters.

    In servlet, if not integer, create ErrorList, put in session, redirect
    back to JSP.

    or... Use Struts, which has most of this built in.

    --
    now with more cowbell
    Bryce, Jul 14, 2004
    #2
    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. Kevin Burton
    Replies:
    2
    Views:
    359
    Jerry III
    Nov 1, 2003
  2. =?Utf-8?B?S2lvc215IEFsbWVuYXJlcw==?=

    How send notify to client?

    =?Utf-8?B?S2lvc215IEFsbWVuYXJlcw==?=, Mar 7, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    318
    =?Utf-8?B?S2lvc215IEFsbWVuYXJlcw==?=
    Mar 7, 2004
  3. sck10
    Replies:
    6
    Views:
    884
    sck10
    Sep 1, 2006
  4. KK
    Replies:
    5
    Views:
    1,249
  5. pat
    Replies:
    2
    Views:
    144
    Peter J. Holzer
    Oct 7, 2006
Loading...

Share This Page