aspose file tools*
The moose likes JSP and the fly likes how to get the <select> tag value from one jsp page to another jsp page during file uploading time? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » JSP
Bookmark "how to get the <select> tag value from one jsp page to another jsp page during file uploading time?" Watch "how to get the <select> tag value from one jsp page to another jsp page during file uploading time?" New topic
Author

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

krishna moorthyv
Greenhorn

Joined: Dec 13, 2012
Posts: 7

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

Joined: Mar 17, 2011
Posts: 7064
    
  16

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

Isn't it funny how there's always time and money enough to do it WRONG?
Artlicles by Winston can be found here
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60057
    
  65

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.


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: how to get the <select> tag value from one jsp page to another jsp page during file uploading time?
 
Similar Threads
Need Dynamic Add button to Add browse button in website
not redirecting to servlet page
exception
photo upload from jsp to servlet and then storing in oracle database
MultipartRequest cannot be resolved to a type