Results 1 to 4 of 4
  1. #1
    saran87 is offline Member
    Join Date
    Jul 2009
    Location
    india
    Posts
    9
    Rep Power
    0

    Default NumberFormatException error

    SEVERE: Servlet.service() for servlet jsp threw exception
    java.lang.NumberFormatException: For input string: ""
    this type of error is coming...
    i put text box...the text box should not emptly submitted for that the pop up window will open and give a msg please enter id like that ...
    i am using jsp and script in that ...

  2. #2
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Then you want to put a validation on the textbox to make sure that no empty Strings are submitted. The first validation you need is a client side one (Javascript) then you also need a server side check to make sure that the exception you are getting doesn't happen.

  3. #3
    saran87 is offline Member
    Join Date
    Jul 2009
    Location
    india
    Posts
    9
    Rep Power
    0

    Default

    Thank you friend r035198x .....

  4. #4
    r035198x is offline Senior Member
    Join Date
    Aug 2009
    Posts
    2,388
    Rep Power
    7

    Default

    Welcome, just wanted to reinforce that server side validations are always required regardless of whether you have client validations or not. Client side scripts could be disabled by the user or someone my try to access through another view where the client side scripts do not exist.

Similar Threads

  1. NumberFormatException
    By Manfizy in forum New To Java
    Replies: 13
    Last Post: 07-09-2009, 11:59 AM
  2. NumberFormatException raised
    By venkatallu in forum New To Java
    Replies: 1
    Last Post: 06-02-2009, 09:27 PM
  3. Hi , Error in Jsp page is as "NumberFormatException.forInputString(Unknown Source)"
    By lavanya82 in forum JavaServer Pages (JSP) and JSTL
    Replies: 9
    Last Post: 02-20-2009, 07:22 AM
  4. NumberFormatException problem
    By bluebarca in forum New To Java
    Replies: 1
    Last Post: 02-06-2009, 07:39 AM
  5. Error: NumberFormatException
    By coco in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 07:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •