java - Pass drop down list value from jsp to spring controller -


given following code:

@controller   public class foo   {       public void foo(@requestparam("dropdown") string value)       {            ...     }   }   

and jsp:

<div>        <form action="/foo">         <select id="dropdown">             <option value="bar">bar</option>       </select>     </form>    </div> 

how can pass value gets selected in dropdown id spring controller? stands invalid request parameters when attempt ot execute this.

<div>        <form action="/foo">         <select name="dropdown">             <option value="bar">bar</option>       </select>     </form>    </div> 

Comments

Popular posts from this blog

sublimetext3 - what keyboard shortcut is to comment/uncomment for this script tag in sublime -

java - No use of nillable="0" in SOAP Webservice -

ubuntu - Laravel 5.2 quickstart guide gives Not Found Error -