New to
Java? I see a couple of problems in your code. First, you declare an instance scope variable:
Then you pass it to a class method, which is totally unnecessary, because it is already accessible:
Then you create a new, but very similarly named variable in the method (Bad Idea!):
and you set the value for the local variable, but you do not set the value for the instance variable:
You also do not need to use OGNL syntax on your JSP tag (the percent sign and brackets). The JSP tag will take the property name itself as an argument: