• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Need help with req.getParameter ()method

 
harpd dhillon
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm trying to get the values from the form and update the corrosponding database record.
I know for String variable , i would use:
member.password = req.getParameter("password");
I need to know how to get variable of type int and timestamp object.
Any suggestions would be greatly appreciated. Thanks a lot
 
SJ Adnams
Ranch Hand
Posts: 925
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
they're all strings so you gotta parse em.
 
harpd dhillon
Greenhorn
Posts: 8
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Simon,
I'm totally new to this. COuld you plz gimme an example??...I'd appreciate it greatly
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 33671
316
Eclipse IDE Java VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Take a look in the API under the class you want. For example, to get an integer:

You may also want to check whether the parameter is null first, to avoid an exception.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic