servlets: how to notify of failed validation

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dave

    servlets: how to notify of failed validation

    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


  • Bryce

    #2
    Re: servlets: how to notify of failed validation

    On Wed, 14 Jul 2004 18:30:31 GMT, "dave"
    <go_away_you_sp ammer_scum@nowh ere.com> wrote:
    [color=blue]
    >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?[/color]

    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

    Comment

    Working...