Servlet的基本信息可以去看(http://blog.csdn.net/csdmo/article/details/74357723)中的相关内容
在上篇内容中编写了JDBC关联数据库并操纵数据库的内容,本篇则在上篇的基础上了解通过Servlet验证登录信息并录入登录信息的操作
首先创建两个Servlet——LongServlet与ZhuCeServlet
package com.yy.servlet.web.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.yy.servlet.dao.UserDao;
import com.yy.servlet.po.User;
public class LongServlet extends HttpServlet{
@Override
protected void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doPost(request, response)