java - Null pointer exception in an if statement in JSP? -
i have jsp program deducts stocks given user input. there 3 branches available (example b1, b2, , b3). form given user ask item code, branch borrow , number of stocks borrowed. connected database update tables after deduction.
i have if statement compares user's choice of branch borrow , real branch determine query executed.
i no errors until go update form says have nullpointerexception on if statement. i've been trying solutions nothing seems me solve problem.
it appreciated if me on one. here's code if statement.
if (strbranch.equals("binangonan")) { ps_binang.executeupdate(); ps_aupdate.executeupdate(); } else if (strbranch.equalsignorecase("tanay")) { ps_tanay.executeupdate(); ps_aupdate.executeupdate(); }
Comments
Post a Comment