• 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
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Liutauras Vilda
Sheriffs:
  • Tim Cooke
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Tim Moores
  • Frits Walraven
  • Ron McLeod
  • Ganesh Patekar
  • salvin francis
Bartenders:
  • Tim Holloway
  • Carey Brown
  • Stephan van Hulst

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: 62231
193
  • 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?
 
Rancher
Posts: 3797
40
  • 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: 67197
169
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.
 
Create symphonies in seed and soil. For this tiny ad:
RavenDB is an Open Source NoSQL Database that’s fully transactional (ACID) across your database
https://coderanch.com/t/704633/RavenDB-Open-Source-NoSQL-Database
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!