<%@page import="bdqn.newsManageServlet.Service.Impl.categoryTBServiceImpl"%> <%@page import="bdqn.newsManageServlet.Service.categoryTBService"%> <%@page import="bdqn.newsManageServlet.Dao.Impl.categoryTBDaoImpl"%> <%@page import="bdqn.newsManageServlet.Dao.categoryTBDao"%> <%@page import="bdqn.newsManageServlet.entity.categoryTB"%> <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="../CSS/admin.css" rel="stylesheet" type="text/css" /> <title>修改主题</title> </head> <body> <% request.setCharacterEncoding("utf-8"); String action=request.getParameter("action"); %> <form action="../doCategoryModifyServlet" method="post"> <div id="opt_type">修改主题</div> <% //获取传递过来的id int id=Integer.parseInt(request.getParameter("cgid")); //根据id从数据库中获取类别信息 ///调用数据访问层获取类别实体 categoryTBService cgService=new categoryTBServiceImpl(); //categoryTBDao cdao=new categoryTBDaoImpl(); categoryTB cate=cgService.getCateById(id); //获取错误信息 String msg=(String)request.getAttribute("ermsg"); if(msg==null){ msg=""; } %> <!-- 利用隐藏域,保存类别ID数据 --> <input type="hidden" name="cgid" value="<%=cate.getCategoryID() %>" /> 主题<input type="text" class="classlist" name="categoryName" value="<%=cate.getCategoryName() %>"/><br/> <!-- 显示错误信息 --> <span style="color:red"><%=msg %></span><br/> <input type="submit" value="提交" class="classlist" /> <input type="reset" value="重置" class="classlist"/> </form> </body> </html>