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. Advertisements

  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. Advertisements

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:
    455
    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:
    410
    =?Utf-8?B?S2lvc215IEFsbWVuYXJlcw==?=
    Mar 7, 2004
  3. sck10
    Replies:
    6
    Views:
    1,225
    sck10
    Sep 1, 2006
  4. KK
    Replies:
    5
    Views:
    1,577
  5. kiran
    Replies:
    5
    Views:
    3,993
  6. Tony Johansson
    Replies:
    3
    Views:
    17,132
    Patrice
    Jan 2, 2010
  7. pat
    Replies:
    2
    Views:
    210
    Peter J. Holzer
    Oct 7, 2006
  8. Albert-Jan Roskam
    Replies:
    2
    Views:
    330
    Chris Angelico
    Nov 25, 2013
Loading...