-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVisitorCount.java
More file actions
32 lines (28 loc) · 905 Bytes
/
VisitorCount.java
File metadata and controls
32 lines (28 loc) · 905 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.annotation.WebServlet;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@WebServlet("/VisitorCount")
public class VisitorCount extends HttpServlet {
private static final long serialVersionUID = 1L;
public VisitorCount() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
try {
PrintWriter p = response.getWriter();
response.setContentType("text/html");
String un = request.getParameter("us");
String pw = request.getParameter("pw");
if(un.equals("ash") && pw.equals("123")) {
p.println("SUCCSEESESE");
}
else {
p.print("LOGIN SFAil");
}
} catch(Exception e) {}
}
}