我正在使用服务器端验证进行登录页面,我应该在 prashanth 和 sharma 的位置填写什么?
package web.com;
@WebServlet(name="AndroidResponse", urlPatterns={"/androidres.do"})
public class AndroidResponse extends HttpServlet {
@Override
protected void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
PrintWriter out=response.getWriter();
String un,pw;
un=request.getParameter("username");
pw=request.getParameter("password");
if(un.equalsIgnoreCase("prashant") && pw.equals("sharma"))
out.print(1);
else
out.print(0);
}
}