With
Java, you will have to do it in two steps...one have the action of the form go to an intermediate page, like so...
You can look that up in an HTML tutorial or resource.
Next on the page inputCheck.jsp, you would have something like this...
Then you can operate on the input, and check it as you need to. If you need simpler input checking you might try Javascript, because the request won't have to make a round trip to the server to verify the input. Hope this helps some.