Site icon DataFlair

How to Create a Login in Servlet Using NetBeans

Program 1

<html>
    <head>
        <title>My Login Page</title>
    </head>
    <body>
     <center>   
         <form method="Post" action="LoginServlet">   
          <h3>Login Page</h3>  
       <table border="1">
           <tr>
               <th>User Name</th>
               <td><input type="text" name="txtuser"></td>
           </tr>  
          <tr>
               <th>Password</th>
               <td><input type="password" name="txtpass"></td>
           </tr>   
         
         <tr>
             <td></td>
             <td>
                 <input type="submit" value="Submit">
                 <input type="reset" value="Reset">
             </td>
         </tr>
       </table>    
      </form>    
     </center>       
    </body>
</html>

 

Exit mobile version