As far as i know, ID attribute cannot be used to get values in java. where you have Define One Method Called getTextValue then how to pass text value to this method . so you java class should be like First Jsp Servlet Example-Login Page..