This is a chunk of my code from my LoginServlet.java:
public void printLoginTable(PrintWriter out)
out.println("<FORM METHOD=POST ACTION="/com/wrox/servlet/Authenticate1">");
out.println("ID: <INPUT TYPE=TEXT NAME=uid SIZE=20><BR>");
out.println("Password: <INPUT TYPE=PASSWORD NAME=pw SIZE=20><BR>");
String userId = req.getParameter("uid");
String password = req.getParameter("pw");
bool validated = validate(userId,password);
//then go back to some other page...
basically its purpose is to create the HTML form to take in a user id and password, then the last two lines are supposed to take those two parameters and process those strings elsewhere. Am i doing this correctly? I'm guessing not because i have to worry about the "onclick" action of an html form...but how do i make my req.getParameter wait for onclick? Or am i totally off?