Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6082091
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T11:15:01+00:00 2026-05-23T11:15:01+00:00

I have a user drop down in my JSP page where I show the

  • 0

I have a user drop down in my JSP page where I show the user list. In the drop down I need to show the user name and email as the label while value will be user id and user email address. So I need to concatenate the properties of my user instance to show the proper label and values.

What is the best possible approach to do this in the Spring MVC?

I can iterate over the list in my Spring Controller and concatenate the properties and then create a new list which will be displayed in the page. This is the way I can think of.

Any better ideas?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T11:15:02+00:00Added an answer on May 23, 2026 at 11:15 am

    Add users list object to the model and use standard tag lib to build the html

    <select id="users" name="users">
      <c:forEach items="users" var="user">
        <option value="${user.id}">${user.name} [${user.email}]</option>
      </c:forEach>
    </select>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a drop-down list hardcoded in an MVC View User Control page and
I have a user control in a master page with two drop down lists.
I'm using classic asp, I have a drop down list that the user selects
I have a User being reviewed drop down list, a SelectList of employees, and
I have a drop-down navigation that brings the user to the page selected in
I have multi-select drop down list where in user can select multiple options, now
I have several user controls that contain a drop down list, various validation controls,
I have two html drop down list, their value are retrieved from the database
I need to create a certain number of objects based on user-selected drop-down list.
We have an entry form that gives the user a calendar drop down, but

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.