电影列表 - 在线购票
| 影片编号 | 影片名称 | 影片时长 | 影片类型 | 操作 |
|---|---|---|---|---|
| ${f.fid} | ${f.fname} | ${f.fduration} | ${f.ftags} | 定票 |
package servlet;
import model.Film; import service.impl.QueryAllFilmServiceImpl; import util.JdbcUtil;
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 java.io.IOException; import java.sql.Connection; import java.sql.SQLException; import java.util.ArrayList; import java.util.List;
/**
- @author 高蒙蒙
- @date 2023/8/15 12:25
*/
@WebServlet("/FilmServlet")
public class FilmServlet extends HttpServlet {
@Override
protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
List
filmList=new QueryAllFilmServiceImpl().queryAllFilm(); req.setAttribute("filmList",filmList); req.getRequestDispatcher("/index.jsp").forward(req,resp); } }
原文地址: https://www.cveoy.top/t/topic/qkZT 著作权归作者所有。请勿转载和采集!