By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,032 Members | 811 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,032 IT Pros & Developers. It's quick & easy.

servlets: how to notify of failed validation

P: n/a
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
Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
On Wed, 14 Jul 2004 18:30:31 GMT, "dave"
<go**********************@nowhere.com> 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
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.