request.getAttribute return null...
I am beginner to servlets. I am writing a small application.
I have a register servlets which get username and password.
PrintWriter pw = response.getWriter();
pw.println( "<html>" );
pw.println( "<head>" );
pw.println( "</head>" );
pw.println( "<body>" );
pw.println( "<form name='frm1' method='POST' action=/HelloWorld/CreateLoginUser>" );
pw.println("Username : ");
pw.println( "<input type=\"text\" name='uname'/>
" );
pw.println("Password : ");
pw.println( "<input type=\"text\" name='pwd' />
" );
pw.println( "<input type='submit' name='submitbutton' value='Create'/>" );
pw.println( "</form>");
pw.println( "</body>" );
pw.println( "</html>" );
Next I have the CreateLoginuser servlets
String username = (String)request.getAttribute("uname");
String password = (String)request.getAttribute("pwd");
try {
boolean isExist = UserList.isUserExist(username);
if(isExist){
//inform the client
return;
}
//create the user
} catch (SQLException e) {
e.printStackTrace();
}
While I debug in eclipse i get null in request.getAttribute for username and password. pls help me to get rid of the problem

