• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

NumberFormatException : null

 
Ranch Hand
Posts: 68
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please help
Im not able to find wheres the problem and how to resolve



The servlet is to upload 2 files and insert the data in the form.

 
Sheriff
Posts: 67748
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So what's the problem? What line it is on?

Here's some helpful hints:

  • Just posting a bunch of code and asking "what's wrong with it?" isn't an effective way to get help on an issue.
  • Always provide the exact error message, not your paraphrasing of it.
  •  
    Gaurav Wadhwani
    Ranch Hand
    Posts: 68
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Problem is the exception generated...its on line 115





     
    Bartender
    Posts: 4568
    9
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    It seems likely that one of the parameters you think is an integer isn't in fact an integer. If you want more than that you'll have to tell us where the error happens.

    Edit: ah, there you go. What's the value of the day parameter?
     
    Bear Bibeault
    Sheriff
    Posts: 67748
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Basic debugging step #1, what is the value returned by the call to getParameter()? That's something that should be checked long before you post the problem to a forum.
     
    Gaurav Wadhwani
    Ranch Hand
    Posts: 68
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    ok i checked....it returns null.

    the form has a element with name "day". Then why the problem?

     
    Bear Bibeault
    Sheriff
    Posts: 67748
    173
    Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Use a tool such as HttpFox for Firebug to see the HTTP request for the form submission. Is the request parameter there as you expect?
     
    Gaurav Wadhwani
    Ranch Hand
    Posts: 68
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    you are right...
    I tested using HttpFox, it doesnt return any value...



    and if you notice 2 rows below it, then those the images i want to be uploaded. Method turns into GET....thats strange
     
    Gaurav Wadhwani
    Ranch Hand
    Posts: 68
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Ok i found the solution....

    Multipart/form is handled dependent on the API one uses. I used Apache's org.apache.commons.fileupload . for it this is the way to go...

    request.getParameters() wont work...


     
    Don't get me started about those stupid light bulbs.
    reply
      Bookmark Topic Watch Topic
    • New Topic