aspose file tools*
The moose likes JSP and the fly likes getting data from html drop down list to jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "getting data from html drop down list to jsp" Watch "getting data from html drop down list to jsp" New topic
Author

getting data from html drop down list to jsp

Meenal Srivastva
Greenhorn

Joined: Jan 21, 2007
Posts: 19
This is my html code:
<select size="1" name="qualification">
<option value="M.Tech">M.Tech</option>
<option value="M.C.A.">M.C.A.</option>
<option value="B.Tech" selected>B.Tech</option>
</select>

And this is my jsp code:
<%= request.getParameter("qualification")%>

In the jsp, "null" is being displayed ...
But all the text type fields of the html are properly retrieved ....

Any suggestions...?

P.S. i have tried using tags(along with a bean) to do this too.....nothing works


Thanks,
Meenal
santosh kothapalli
Greenhorn

Joined: Dec 27, 2005
Posts: 26
submit the html page and give the action attribute as jsp page then you will get the value.Before the page is submitted you cant retrieve the value using request.getParameter()
[ January 18, 2008: Message edited by: santosh kothapalli ]

Santosh K<br />SCJP 1.4,SCWCD
Meenal Srivastva
Greenhorn

Joined: Jan 21, 2007
Posts: 19
The html code is in a Html page (with a form whose action attribute is set to a different jsp page)...and the jsp page is different....

i guess i didnt specify my problem carefully!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Double check your HTML to make sure that the select list properly nested inside your form.

Look for nested forms.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: getting data from html drop down list to jsp