Servlet code for validating user
The parameters are the way in which a user can send information to the Http Server.For example, in a login screen, we need to send to the server, the user and the password so that it validates them.In the servlet class will collect the values from login form page by using the method get Parameter().The output will be displayed to you by the object of the Print Writer class.
The default form method is set to POST and its action is sent to "check Login.jsp" page.
To implement this requirement we have to make one html form which will have two fields named as username and password in which user will enter username and password.
And we will also have one submit button, on pressing the submit button the request will go to the server and servlet will do the corresponding validation.
This means that when the user click the Login button (Or Press enter), the browser will call the page "check Login.jsp" while passing the username and password attached in the HTTP-POST method.
This login form is in the simplest form as much it can be.