试试这个
String goodsname = request.getParameter("值");
string a="select * from table1 where goodsname="+goodsname+" ";