1

Good morning!

Here's the deal guys, I have a class that my view is passed that I want to access via JSTL. My question is, does anyone know of a way to access superclass properties of that class?

e.g.

< p >${myClass.greeting}< /p >

Assuming a hypothetical,

class mySuperClass{
    private String greeting = "I love stack overflow";

    public String getGreeting(){
        return greeting;
    }
}//end mySuperClass

class myClass extends mySuperClass{
    private String notImportant = "I like applesauce";

    public String getNotImportant(){
        return notImportant;
    }//end notImportant

}//end myClass
darkpbj
  • 2,892
  • 4
  • 22
  • 32

1 Answers1

0

Wow I'm a dope . . .

So I was actually trying to get a property like,

< p >${myClass.getGreeting}< /p >

i.e., calling the full accessor name as opposed to,

< p >${myClass.greeting}< /p >

Sorry, I've been staring this page in the eye for a little too long. Tip of the hat to Sajan Chandran for making my double-take.

darkpbj
  • 2,892
  • 4
  • 22
  • 32