-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmyServ.java
More file actions
32 lines (27 loc) · 879 Bytes
/
myServ.java
File metadata and controls
32 lines (27 loc) · 879 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
package com.FeeManage;
import java.io.IOException;
import java.io.PrintWriter;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class mainServ extends HttpServlet {
private static final long serialVersionUID = 1L;
public void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
String uname= request.getParameter("uname");
String pass= request.getParameter("upass");
PrintWriter out= response.getWriter();
if(uname.equalsIgnoreCase("Mahi"))
{
if(pass.equalsIgnoreCase("123"))
{
out.println("The account has been logged in");
}
else{
out.println("This is the right admin");
}
}
else
out.println("Login failed");
}
}