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 6719841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:08:25+00:00 2026-05-26T09:08:25+00:00

I have a page with a select (drop-down). It will have values like: SUN

  • 0

I have a page with a select (drop-down). It will have values like:

"SUN" - "Sunday"
"MON" - "Monday"
"TUE" - "Tuesday"
etc.

I can:

  • store the list of values inside of the page (JSP-page) with
    ‘option‘ tag
  • keep it in a Map in MyForm.class and pass it to the page from
    Controller using ‘options‘ tag.

The current example is about days of the week(there are only 7 of them), but is also applicable to days of the month (the amount of data becomes bigger), etc.

What will be the better way?

P.S. I’m using Java, JSP and Spring Framework

  • 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-26T09:08:26+00:00Added an answer on May 26, 2026 at 9:08 am

    This type of data should be exposed through a controller or encapsulated in a custom tag (or both).

    You don’t want to hard-code strings into a JSP (in general) because of I18N issues, although you could do the I18N for that in the JSP, it’s just more verbose.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

On my page I have a drop-down select box, with a default value of
I have a select drop-down that selects a theme for the current page the
I have a select box on a classic ASP page which looks like this:
I have a drop down menu on a remote page whose source i can
I need some help please, I have a PHP page with a drop down
I have a drop-down navigation that brings the user to the page selected in
I have a drop down list with two values (for now..) with other elements
I have a select drop-down that is supposed to represent the hierarchy of pages
I have a drop down menu, with two options: <select name="chs" value="" id =
I have a php page that contains a form with 7 drop down boxes.

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.