public class QueryServlet extends HttpServlet {
@Override
protected void service(HttpServletRequest req
, HttpServletResponse resp
)
throws ServletException
, IOException
{
goodsDao gd
= new goodsDao();
ArrayList
<goods>list
=gd
.querAll();
req
.setAttribute("list", list
);
req
.getRequestDispatcher("index.jsp").forward(req
,resp
);
}
}`
转载请注明原文地址:https://tech.qufami.com/read-19241.html