Java Servlet 处理公告更新请求:参数解析和页面跳转
protected void toUpdateGonggao(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n String id=request.getParameter("id");\n Gonggao Gonggao = GonggaoService.findGonggaoById(id);\n request.setAttribute("data" ,Gonggao);\n request.getRequestDispatcher("/WEB-INF/view/gonggao/update.jsp").forward(request,response);\n }\n上述代码有两个参数:HttpServletRequest request和HttpServletResponse response。
原文地址: https://www.cveoy.top/t/topic/pQYr 著作权归作者所有。请勿转载和采集!