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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T12:57:29+00:00 2026-06-10T12:57:29+00:00

One thing I learned today is there is no selected property in <html:option> like

  • 0

One thing I learned today is “there is no selected property in

<html:option>

like plain old option” , we can give value in

<html:select>

that matches the value against each option and if match found marks the option selected.

but I want to make multiple options pre-selected on page load(am using

<html:select multiple="true">

How can it be achieved?

  • 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-06-10T12:57:30+00:00Added an answer on June 10, 2026 at 12:57 pm

    Implement the following:

    1. If possible use JavaScript to make the selected entries true for the
      multiple entries u had made in that select list
    2. Make it selected by using Java-script first by calling javascript
      function before any action OR with that action :

    function callSelectAll(selectName)  
    {   
        var i;  
        for(i=0;i<...) {  
            document.getElementById(selectName).options[i].selected = true;
        }  
    

    }

    And use String[] array name as a property name for that html:select property form bean property. And the name of that array as a property of that html:select in jsp page.

    You will ultimatly gate the all selected values un the that string array of form bean.

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

Sidebar

Related Questions

If there's one thing I've learned about Rails 3 is if I'm having a
One thing I lack understanding on is how can code compiled for an Intel
One thing I've noticed with all the XML-RPC examples out there, including the spec
One thing I have continually found very confusing about using an object database like
One thing I've learned at engineering school is to always to intense validation of
I'm in the process to learn Subversion, and so far I've learned one thing
One of the first things I learned in C++ was that #include <iostream> int
One if the first things I learned when I started with C# was the
One thing I repeatedly do after I made changes to a method is I
One thing that bothers me about nHibernate is that it is not 100% compile

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.