package com.feicui.demo.servlet;
import java.io.IOException;
import java.util.List;
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 com.feicui.demo.dao.ShopDao;
import com.feicui.demo.entity.Shop;
/**
* 商城后台
*/
@WebServlet("/shopUpdateServlet")
public class ShopUpdateServlet extends HttpServlet {
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String shop_no = request.getParameter("shop_no");
ShopDao shopDao = new ShopDao();
Shop shop = shopDao.getShopByShop_no(shop_no);
request.setAttribute("shop", shop);
request.getRequestDispatcher("shop_update.jsp").forward(request, response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}
import java.io.IOException;
import java.util.List;
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 com.feicui.demo.dao.ShopDao;
import com.feicui.demo.entity.Shop;
/**
* 商城后台
*/
@WebServlet("/shopUpdateServlet")
public class ShopUpdateServlet extends HttpServlet {
/**
* @see HttpServlet#doGet(HttpServletRequest request, HttpServletResponse response)
*/
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String shop_no = request.getParameter("shop_no");
ShopDao shopDao = new ShopDao();
Shop shop = shopDao.getShopByShop_no(shop_no);
request.setAttribute("shop", shop);
request.getRequestDispatcher("shop_update.jsp").forward(request, response);
}
/**
* @see HttpServlet#doPost(HttpServletRequest request, HttpServletResponse response)
*/
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
}
}