これを書いたのと同じページに複数の値を送信するには、複数のリクエストディスパッチャが必要でしたか。
String name=rs.getString("itemname");
String code=rs.getString("itemcode");
String lpr=rs.getString("lastpurchase");
String ur=rs.getString("unitrate");
String pq=rs.getString("pquantity");
String cpq=rs.getString("costpquan");
ServletContext context= getServletContext();
RequestDispatcher rd=context.getRequestDispatcher("/index.jsp")
rd.forward(request,response);
これらすべての変数を同じページに送信する必要があります。