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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T08:35:55+00:00 2026-06-17T08:35:55+00:00

I followed the steps in this question and I am still running into problems.

  • 0

I followed the steps in this question and I am still running into problems.

My Controller looks as follows…

@RequestMapping(value = "listBooks.htm")
public String goToNextPage(Model model, HttpServletRequest request){

    HashMap<String,Map<String,String>> hashMapOfData = new HashMap<String,Map<String,String>>();

    Map<String,String> m = new LinkedHashMap<String,String>();
    m.put("1", "foo");
    m.put("2", "bar");
    hashMapOfData.put("m", m);
    model.addAttribute("dropdownData", hashMapOfData);
.....
}

My jsp file…

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<form:select path="dropdownData"><br />
 <form:option label="Select..." value=""/>
 <form:options items="${dropdownData}" itemLabel="label" itemValue="value"/>
</form:select>

I get the error…

org.springframework.beans.NotReadablePropertyException: Invalid property ‘value’ of bean class [java.lang.String]: Bean property ‘value’ is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter

BUT if I change my jsp file to… removing the itemLabel="label" itemValue="value"

<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<form:select path="dropdownData"><br />
 <form:option label="Select..." value=""/>
 <form:options items="${dropdownData}"/>
</form:select>

The page does load, but the drop down box selections are

  • Select…
  • {1=foo, 2=bar}

Can anyone help me out? I am quite a novice when it comes to Spring MVC so very detailed answered would be much appreciated.

  • 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-17T08:35:57+00:00Added an answer on June 17, 2026 at 8:35 am

    The error describes it all

    org.springframework.beans.NotReadablePropertyException: Invalid property 'value' of bean class [java.lang.String]: Bean property 'value' is not readable or has an invalid getter method: Does the return type of the getter match the parameter type of the setter
    

    Spring is trying to find a getter for value within the java.lang.String, something that doesn’t exist.

    I’d just use a List<LabelValueModel> (LabelValueModel being something you make yourself, which has the properties for label and value.

    Your final jsp would look like this then:

    <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
    <form:select path="dropdownData"><br />
     <form:option label="Select..." value=""/>
     <form:options items="${dropdownData}" itemLabel="label" itemValue="value"/>
    </form:select>
    

    LabelValueModel would just be a simple POJO to avoid binding to a specific technology:

    public class LabelValueModel
    {
      private String label;
      private String value;
    
      ..public getters..
      ..might consider private setters and only allowing setting through constructor..
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have followed the steps discussed in this related question , but without success.
I've followed the steps from this question: Higher color depth for MFC toolbar icons?
I followed the steps using this site : http://wiki.apache.org/nutch/RunNutchInEclipse I encountered a problem while
I followed all the steps given in this blog. When i am trying to
I'm using Xcode 4.3 and I have followed this user's steps to create the
Similar to this question but with a difference subtle enough that I still need
I followed by the tutorial for devise: http://railscasts.com/episodes/209-introducing-devise I ask this question because localhost:3000/users/registration/sign_up
I'm running into a little trouble with MySQL Workbench. This is the situation, I'm
A very basic question concerning dropBox integration into an iPhone app. I followed the
This question stems from this question that I asked yesterday. I've followed Theo's advice

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.