Site icon DataFlair

How to Create Login Form using NetBeans in JSP

Program 1

<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body>
      <center>  
       <% 
            String user,pass;
            user=request.getParameter("txtuser");
            pass=request.getParameter("txtpass");
            if(user.toUpperCase().equals("VIVEK") && pass.equals("dataflair"))
                out.println("<font color=green size=5>You are valid user</font>");
            else
                out.println("<font color=red size=5>You are Invalid user</font>");
       %>    
      </center> 
    </body>
</html>
Exit mobile version