Passing name=value from a html form
Hi All,
I am finding strange behaviour when I try to pass a uri with a name=value pair through a html form to a servlet.
Basically, the the html form looks something like this....
<form method=get action="http://localhost:8080/jsp_tutorials/GetParameter?type=add">
Message:
<input type="text" name="param1">
<input type="submit" value="submit">
</form>
And when I click submit, the servlet is supposed to extract the "type" of action, namely "add". But surprisingly, when I do click submit, the "type=add" bit of the URI doesn't seem to go through ! Can someone explain to me why this is the case. I mean if I was to use the same uri with a simple link ie...
<a href="http://localhost:8080/jsp_tutorials/GetParameter?type=add">add</a>
it seems to go through nicely.... but with the form it just doesn't. I could solve the problem using a hidden input ie....
<form method="get" action="http://localhost:8080/jsp_tutorials/GetParameter">
Message:
<input type="text" name="param1">
<input type="hidden" name="type" value="add">
<input type="submit" value="submit">
</form>
and it seems to work too. But I am just wondering why the appended name=value pair do not go through with the uri ?
I would appreciate an explanation...

