package com.mandi.servlet; import java.io.IOException; import javax.servlet.ServletException; import javax.servlet.annotation.WebServlet; import javax.servlet.http.HttpServlet; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; /** * @author mengly * @version 创建时间:2015年12月21日 下午4:22:00 * 类说明 */ @WebServlet(urlPatterns="/test/test/test") public class Servlettests extends HttpServlet { private static final long serialVersionUID = -3405108698788535266L; @Override protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { resp.getWriter().write("It is a test do get"); for (int i = 0; i <100; i++) { System.out.println("wo test postDoGet time:"+i); } } @Override protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException { super.doPost(req, resp); } }