title: how to display incorrect pwd on the same login page
body: <p>After checking the database the incorrect password should be displayed on the same login page.
  I have used servlet and forwarded that to the login page but i couldn't add the message "incorrect password".</p>
  
  <pre><code>RequestDispatcher rd = getServletContext().getRequestDispatcher("/register.jsp");
  if(dbpwd.equals(null)) {    
      pw.println("Not a registered user!!! sign up......");
      rd.forward(req,res);
  }
  </code></pre>
  
  <p>In tha above snippet how to print the "Not a registered user sign up......" on the login page.</p>