Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

how to get the <select> tag value from one jsp page to another jsp page during file uploading time?

 
krishna moorthyv
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

my project concept is to upload file to data base from The below code working fine but the problem is i can't get the <select> tag value from one page to another it always show null value

<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>

</tr>

<table>

</center>

</FORM>

<%
String s1=request.getparameter("t1");
out.println("the value of s1 is"+s1); // here always show null value

%>



 
Winston Gutkowski
Bartender
Pie
Posts: 10417
63
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
krishna moorthyv wrote:my project concept is to upload file to data base from The below code working fine but the problem is i can't get the <select> tag value from one page to another it always show null value

1. I don't see a question.
2. I don't see any code; and if there is any, it most certainly isn't Java.

I suggest you read the HowToAskQuestionsOnJavaRanch page - thoroughly - and try again.

Winston
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64838
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is no such method as request.getparameter(). Case counts!

And, you cannot use the getParameter() and similar methods with a multipart form. See the JspFaq and ServletsFaq for more info on file uploading.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic