This is not a tomcat question. It is an HTML question. The answer is that the form will post a variable with the name of the input control = value of the input control, or, anyname=x where x is the selected value of anyname.
i.e. <form action="#"> <select name="anyname"> <option>1</option> <option>2</option> </select> <input type=submit> </form> Will submit ...#?anyname=1 if loaded and submitted without changing the drop-down value. Tim -----Original Message----- From: Xin Hua Sun [mailto:[EMAIL PROTECTED] Sent: Sunday, March 26, 2006 6:39 PM To: users@tomcat.apache.org Subject: Re: how to get selected value from drop down box which get from database Hi Everyone, I have a problem with get selected value from drop down box which the data get from database. I use the following code to succefully get the data from database and dsiplay it in the drop down box. But I don't know how to get the selected value from drop down box and send it to servlet to process. The code is as follows; <select name="anyname"> <% for(int i=0; i<dbdata.length; i++) { %> <option><%=dbdata[i] %></option> <% } %> Thanks for your help! Xin --------------------------------- Blab-away for as little as 1ยข/min. Make PC-to-Phone Calls using Yahoo! Messenger with Voice. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]