web层:
在Servlet中运行:
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
LiNingEntity.ApplicationDataFlowDiagram adf=null;
com.bll.DataApplication.DataManagerApproveMgr da=new DataManagerApproveMgr();
//1.读取属性值
try{
request.setAttribute(“”,adf.getAgentCell());//第一个参数书捕捉前台的文本名,第二个参数得到实体类该属性的值(从数据库中获取)。
} catch (SQLException e){
e.printStackTrace();
}
}
//2.写入属性值
try{
asf.setAuditComents(request.getParameter(“ ”));//参数数据库字段名
} catch (SQLException e){
e.printStackTrace();
}
}
request.getResquestDispatcher(“Uinfo.jsp”).forward(request,response);//第一个参数是返回到页面地址
//因为前边用的是:post方法
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
this.doGet(request,response);
}