Calling a Servlet From Html Form

As we know that in java web application, we write our presentation logic in jsp, using html, css, java scriptm jsp tags etc. and business logic in servlet (java code). So we have to always send data from html form to the servlet and servlet receives this data and process it as per the business need.

 Validating userid and password with servlet :-

Designing Login page.
login-form

  Servlet code accessing data from html form:-

login-form-servlet