HTTP状态 500 - 内部服务器错误
发表在JavaWeb图书答疑
2023-07-23
《JavaWeb项目开发实战入门》第2章 51商城
是否精华
是
否
版块置顶:
是
否
<%
ResultSet rs_new = conn.executeQuery("select top 12 t1.ID, t1.GoodsName,t1.price,t1.picture,t2.TypeName "
+"from tb_goods t1,tb_subType t2 where t1.typeID=t2.ID and "
+"t1.newGoods=1 order by t1.INTime desc");
int new_ID = 0;
String new_goodsname = "";
float new_nowprice = 0;
String new_picture = "";
String typeName = "";
%>
<%
ResultSet rs_sale = conn.executeQuery("select top 12 t1.ID, t1.GoodsName,t1.price,t1.nowPrice,t1.picture,t2.TypeName "
+"from tb_goods t1,tb_subType t2 where t1.typeID=t2.ID and t1.sale=1 "
+"order by t1.INTime desc");
int sale_ID = 0;
String s_goodsname = "";
float s_price = 0;
float s_nowprice = 0;
String s_introduce = "";
String s_picture = "";
%>
这两段代码轮流报错,都显示
java.lang.NullPointerException