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

The Archive Base Latest Questions

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

So we all know that #{someBean.value} will try and get the content of some

  • 0

So we all know that #{someBean.value} will try and get the content of some property on someBean called value. It will look for getValue(). However, what if this property is boolean? It will look for isValue(). What it won’t look for is hasValue().

This got me thinking, what exactly does it do?

Java EE 5 tutorial chapter – Unified Expression Language refers to PageContext.FindAttribute(). PageContext sends you to JSPContext. None of them actually explain the rules they are following to determine the name of the method they are looking for.

It is also fairly easy to find documentation that says the method names must begin with get. However, I know that isValue() works.

Can anyone point me to documentation where this is written down. I’m not looking for tutorials or examples I’m looking for reference.

  • 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-15T17:26:10+00:00Added an answer on May 15, 2026 at 5:26 pm

    It’s authoritatively documented in both the JavaBeans Spec and EL Specification.

    To take the boolean property as an example, it’s described in chapter 8.3.2 of JavaBeans spec:

    8.3.2 Boolean properties

    In addition, for boolean properties, we allow a getter method to match the pattern:

    public boolean is<PropertyName>();

    This “is<PropertyName>” method may be provided instead of a “get<PropertyName>” method,
    or it may be provided in addition to a “get<PropertyName>” method.

    In either case, if the “is<PropertyName>” method is present for a boolean property then we will
    use the “is<PropertyName>” method to read the property value.

    An example boolean property might be:

        public boolean isMarsupial();
        public void setMarsupial(boolean m);
    

    So, #{bean.marsupial} expects exactly the above getter/setter pair.

    And in chapter 1.23.5 of EL spec:

    1.23.5 Coerce A to Boolean or boolean

    • If A is null and the target type is not the primitive type boolean, return null
    • If A is null or "", return false
    • Otherwise, if A is a Boolean, return A
    • Otherwise, if A is a String, and Boolean.valueOf(A) does not throw an
      exception, return it
    • Otherwise, error

    See also:

    • javax.el.PropertyNotFoundException: Property 'foo' not readable on type java.lang.Boolean
    • Java: how to name boolean properties
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We all know that RAW pointers need to be wrapped in some form of
We all know that generic List<> does not box value types. Why on the
We all know that commenting our code is an important part of coding style
We all know that having a good note taking tool is important as a
We all know that deadlines and/or critical bugfixes and make us forget a bit
We all know that you can overload a function according to the parameters: int
We all know that modifying a .NET web application's web.config file restarts the app
Folks, we all know that IP blacklisting doesn't work - spammers can come in
Our dev shop currently uses Visual SourceSafe. We all know how that could end
I have a List< int[] > myList, where I know that all the int[]

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.