赞
踩
这个要几个类的调用的,不是几行代码就可以解决的。如果用Servlet来做的话,Servlet就这样写
public class BookServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public BookServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
//1、获取表单值, 比如
//String param1 = request.getParameter("param1");
//。。。。。。。
//String paramN = request.getParameter("paramN");
//从表单或session之类的上下文中取得数据,进行业务处理
//然后再返回给用户页面,比如response.getWriter.write("成功")
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doGet(request, response);
}
}
大概的框架就是这个样子
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。