Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

get int parameter

843841Mar 20 2005 — edited Mar 20 2005
hi..i need some help here..

i use this code

keyID2 = request.getParameter("keyID2")
keyID3 = request.getParameter("keyID3")

and assign the value to String keyID2 and keyID3. The value i received from keyID2 and keyID3 is both an integer value, but using the syntax request.getParameter("keyID2") i can only assign the value received to a string variable.
The problem is i need to add up both the value of string keyID2 and keyID3 and assign it to an integer variable, but it seems if i just do the normal keyID2+keyID3, the normal integer addition doesn't occur here; instead it just concantenates both the now string value.

how do i overcome this problem?
any help are greatly appreciated. thanks in advance
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 17 2005
Added on Mar 20 2005
3 comments
441 views