• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

getting data from html drop down list to jsp

 
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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 ]
 
Meenal Srivastva
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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!
 
Sheriff
Posts: 13411
Firefox Browser VI Editor Redhat
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Double check your HTML to make sure that the select list properly nested inside your form.

Look for nested forms.
 
Everybody! Do the Funky Monkey! Like this tiny ad!
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic