Re: JSP form beginner question
From: VisionSet (spam_at_ntlworld.com)
Date: 10/15/03
- Next message: Fred Fasle: "Re: JSP form beginner question"
- Previous message: Mike: "Re: @see in Javadoc not working"
- In reply to: Paul Lutus: "Re: JSP form beginner question"
- Next in thread: Fred Fasle: "Re: JSP form beginner question"
- Reply: Fred Fasle: "Re: JSP form beginner question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Wed, 15 Oct 2003 11:16:15 +0100
"Paul Lutus" <nospam@nosite.zzz> wrote in message
news:voq4c5gac2ml09@corp.supernews.com...
> VisionSet wrote:
>
> < snip >
>
> > or you could validate the input with regEx
> >
> > if(!intParam.matches("[0-9]*")) return null;
>
> Cool test. Accept zero or more digits. How could it fail?
>
> String intParam = "";
> System.out.println(intParam.matches("[0-9]*"));
>
> Result: true
>
> You want:
>
> if(!intParam.matches("[0-9]+")) return null;
Indeed.
-- Mike W
- Next message: Fred Fasle: "Re: JSP form beginner question"
- Previous message: Mike: "Re: @see in Javadoc not working"
- In reply to: Paul Lutus: "Re: JSP form beginner question"
- Next in thread: Fred Fasle: "Re: JSP form beginner question"
- Reply: Fred Fasle: "Re: JSP form beginner question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|