| Author |
Need help with req.getParameter ()method
|
harpd dhillon
Greenhorn
Joined: Jun 03, 2003
Posts: 8
|
|
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
Joined: Sep 28, 2001
Posts: 925
|
|
|
they're all strings so you gotta parse em.
|
 |
harpd dhillon
Greenhorn
Joined: Jun 03, 2003
Posts: 8
|
|
Hello Simon, I'm totally new to this. COuld you plz gimme an example??...I'd appreciate it greatly
|
 |
Jeanne Boyarsky
internet detective
Marshal
Joined: May 26, 2003
Posts: 26489
|
|
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.
|
[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
|
 |
 |
|
|
subject: Need help with req.getParameter ()method
|
|
|