提交 | 用户 | 时间
|
58d006
|
1 |
package com.mandi.servlet; |
A |
2 |
|
|
3 |
import java.io.IOException; |
|
4 |
|
|
5 |
import javax.servlet.ServletException; |
|
6 |
import javax.servlet.annotation.WebServlet; |
|
7 |
import javax.servlet.http.HttpServlet; |
|
8 |
import javax.servlet.http.HttpServletRequest; |
|
9 |
import javax.servlet.http.HttpServletResponse; |
|
10 |
|
|
11 |
/** |
|
12 |
* @author mengly |
|
13 |
* @version 创建时间:2015年12月21日 下午4:22:00 |
|
14 |
* 类说明 |
|
15 |
*/ |
|
16 |
@WebServlet(urlPatterns="/test/test/test") |
|
17 |
public class Servlettests extends HttpServlet { |
|
18 |
private static final long serialVersionUID = -3405108698788535266L; |
|
19 |
|
|
20 |
@Override |
|
21 |
protected void doGet(HttpServletRequest req, HttpServletResponse resp) |
|
22 |
throws ServletException, IOException { |
|
23 |
resp.getWriter().write("It is a test do get"); |
|
24 |
for (int i = 0; i <100; i++) { |
|
25 |
System.out.println("wo test postDoGet time:"+i); |
|
26 |
} |
|
27 |
} |
|
28 |
|
|
29 |
@Override |
|
30 |
protected void doPost(HttpServletRequest req, HttpServletResponse resp) |
|
31 |
throws ServletException, IOException { |
|
32 |
super.doPost(req, resp); |
|
33 |
} |
|
34 |
|
|
35 |
} |