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!

i want to convert string into integer

843838Apr 9 2007 — edited Apr 12 2007
i have an html file in which i m using a text box , for entering amount i m using that text box entry at next jsp. i want to convert amount string into integer for further processing. At next jsp i m using:-

String amount= request.getParameter("bal");
Integer amount1 = Integer.valueOf((String)session.getAttribute("amount"));
and in sql query i m using amount1 as:-
ResultSet rs1 = st.executeQuery("update saving set balance = balance - amount1 where saving.account_no = '" + acc +"'");
my problem is i m getting following error:-
server encountered an internal error and
exception:- numberformat exception
please help me as soon as possible
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 10 2007
Added on Apr 9 2007
8 comments
553 views