问题应该就出在那你那个:Integer.parseInt(变量)上,
从报错来说,应该是括号里面的“变量”是null,当然也就无法转换为Integer类型了。
建议你检查一下这几行代码:
1、flag = Integer.parseInt(flag1); //flag1为null,就会报你说的错误
2、int Price= Integer.parseInt(price); //price为null,就会报你说的错误
反正有Integer.parseInt()的地方都看一看,parseInt()方法括号里面的不能是null,也不能是其他无法转换为数字的字符串
2===============================
String flag1 = (String)session.getAttribute(“flag”);
price = request.getParameter(“text”);
String Ran1 = (String)session.getAttribute(“Ran”);
你确定getAttribute和getParameter都能接收到值吗?说不定session里根本没有这两个key