• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

data insertion probelm in jsp

 
payal kapadia
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi...
when im clicking the submit button the data from the text field gets entered into the database(thru beans).But the probelm is a null value is also getting stored for some wierd reason.What could be the reason for this.I have used request.getParameter to get the value from the textbox.
Please help..

Payal
 
Adeel Ansari
Ranch Hand
Posts: 2874
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
May be you are making some mistake in writing your parameter name. Better post code snippet.
 
Vijay Sharma
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think payal you should send your code,Then only we can tell tell you about the reason,why null values are inserted automatically.
Also,this can be due to Parameter Name mismatching.So just check and respond us.
 
Hema lata
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is this null value gets stored in the same column as textfield value.
If null value is saved in different column then check the field name related to that column. As adeel and vijay mentioned there might be parameter mismatching.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getParameter will return null if there isn't a parameter in the post who's name matches the string given.

IE: if you have a textfield named first_name in your form and you try to read it with request.getParameter("first-name"), a null will be returned.

Check your spelling and case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic