I'm using eclipse. I have a login form like this
<form method="post" action="login">
<p>Login</p>
<input type="text" id="email"/><br>
<input type="text" id="password"/><br>
<input type="submit" value="GET STARTED"/>
</form>
when I use request.getParameter("email")
in the servlet, it doesn't give me the input value because I don't specify the name of input. So I add the name attribute.
<form method="post" action="login">
<p>Login</p>
<input type="text" id="email" name="email"/><br>
<input type="text" id="password" name="password"/><br>
<input type="submit" value="GET STARTED"/>
</form>
But still I don't get the input value. Then after 1+ hour of invalid debugging, I exit the eclipse. Then I restart the eclipse again, the problem is gone.
I guess does it have something to do with "how the IDE mapping form input values" and stuff? I tried clearing the cache of eclipse, but it turned out not related to the issue.
Anyone can explain what happened here? Thanks!
Update in 0504:
It has something to do with the IDE's web browser, although I don't know exactly what the problem is. I change to use the external Chrome and it works fine there.