When I select one city out of many from dropdownbox and submit it will store in database,
when updating the form iam displaying the same values from the database, so how I have to display the selected city in the dropdownbox from the database in jsp. Please help me out ASAP. Thanksinadvance.

You need to use the 'selected' attribute of the OPTION element based on the value fetched from the database.

<selected name="selBox">
  <option value="cityOne">City One</option>
  <option value="cityTwo" selected="selected">City Two</option>
  <option value="cityThree">City Three</option>
</option>

In the above snippet, "cityTwo" would be the value fetched from the database.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.