My project concept is to upload file to data base. The below code is working fine but the problem is I can't get the <select>
value from one page to another it always show null
value.
How to get the <select>
element value from one JSP to another JSP during file uploading time?
<FORM ENCTYPE="multipart/form-data" ACTION="upload_page.jsp" METHOD=POST>
<center>
<table border="0" bgcolor=#ccFDDEE>
<tr><center><td colspan="2" align="center"><B>UPLOAD THE FILE</B>
<center></td></tr>
<tr><td colspan="2" align="center"> </td></tr>
<tr><td><b>Choose the file To Upload:</b></td><td><INPUT NAME="file" TYPE="file"> </td></tr>
<tr><td colspan="2" align="center"> </td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="Send File"> </td></tr>
<tr>
<td>
<select name="t1">
<option value="mars">Mars</option>
<option value="moon">Moon</option>
<option value="sun">Sun</option>
<option value="earth">Earth</option>
</select>
</td>
********
<% String s1=request.getParameter("t1"); System.out.println(s1);
********