This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Grokking Bitcoin and have Kalle Rosenbaum on-line!
See this thread for details.
Win a copy of Grokking Bitcoin this week in the Cloud/Virtualization forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Bear Bibeault
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Frits Walraven
Bartenders:
  • Carey Brown
  • salvin francis
  • Claude Moore

getting java.lang.NumberFormatException  RSS feed

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is my code so far and also i m new in jsp servlet.




This is servlet code:

 
robin Morshed
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Now i m getting java.lang.NumberFormatException: For input string: "" error
 
Marshal
Posts: 64137
215
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is that the empty String? It cannot be turned into a number You didn't say where that is happening, but you might be getting text from a text component which hasn't been filled in yet. It shows you that users can be relied upon to find a way to pass wrong input ; you will have to find a way to stop them.
 
robin Morshed
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what i am trying to do is i want to give user an ooption to chose date and month from the drop down list which came from database and also day too. once the chose the month,year and day then i want to get that value and combine all and convert into a date..but for some reason when i am chosing year and month its not taking. where did i do wrong?
 
Master Rancher
Posts: 4040
47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, if you're not providing a day value then what is this line going to parse?


Also, you really should not have any Java code in a JSP page like that.
 
Marshal
Posts: 67256
170
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Dave Tolls wrote:Also, you really should not have any Java code in a JSP page like that.


Indeed, doing so has been obsolete since 2001! Please read this article for info on properly structuring Java web applications.
 
Just the other day, I was thinking ... about this tiny ad:
Create Edit Print & Convert PDF Using Free API with Java
https://coderanch.com/wiki/703735/Create-Convert-PDF-Free-Spire
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!