In my jsp code I use the request.getParameter() to retrieve the data which is entered in html. The data was retrieved when using get method but it is not when im using post method Why this happend
My html form is
<code>
<form name="inp" action="upload.jsp" method="post" onsubmit="return valid();" enctype="multipart/form-data">
<table align="center" cellspacing="2">
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td></td></tr>
<tr><td><font size="5" color="#E41B17">Select File</font> </td>
<td><input type="file" name="infile"></td>
</tr>
<tr><td><font size="5" color="#E41B17">Target File Name</font></td>
<td><input type="text" size="20" name="filename"></input></td>
</tr>
<tr></tr>
<tr><td colspan="2" align="center"><input type=submit value="Upload" ></td></tr>
</table>
<br></br>
<center>
<a href="index.html"><font color="#E41B17">HOME</font></a>
</center>
</form>
</code>
And my jsp scriptlet is
<% String f = request.getParameter("filename");
System.out.println(f); %>
Thanks in Advance