jsp中如何获取数据库语句的参数
我的前页当中有<%=_rs.getString("username")%>,我想在showrz.jsp里获取username这个参数,我用String name = request.getParameter("username")时候会出现以下错误:An error occurred at line: 5 in the jsp file: /jsrz/admin/showrz.jsp
stmt cannot be resolved
2: <%@ include file="../incoming/common.jsp"%>
3: <%@ include file="../incoming/connectdb.jsp"%>
4: <table width="438" align="center">
5: <%
6: String name = request.getParameter("username");
7: sql="select * from rzbody where name='"+name+"'";
8: rs=stmt.executeQuery(sql);//查询数据库