我给这个删除明细 写了一个servlet,如下。 我应该怎么写才能让我点某一行的“删除明细”按钮后,订单的那一行删除但是表格页面还存在这里的?package web.client;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import domain.Order;
import service.impl.BusinessServiceImpl;
/**
* Servlet implementation class ClientOrderDeleteServlet
*/
@WebServlet("/ClientOrderDeleteServlet")
public class ClientOrderDeleteServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
/**
* @see HttpServlet#HttpServlet()
*/
public ClientOrderDeleteServlet() {
super();
// TODO Auto-generated constructor stub
}
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
String orderid = request.getParameter("orderid");
BusinessServiceImpl service = new BusinessServiceImpl();
Order order = service.findOrder(orderid);
service.deleteOrder(order);
request.getRequestDispatcher("/client/clientlistorder.jsp").forward(request, response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
// TODO Auto-generated method stub
doGet(request, response);
}
}按目前的写法,删除后就成了这个。。。。。
添加回答
举报
0/150
提交
取消