JSP Exception: no getter method

I had my jsp and displaybean working and displaying contents properly. Now I just added a new field for displaybean and I am getting an javax.servlet.jsp.JspException: No getter method for property: "lRating" of bean: "URLDisplayBean"

I added this field "lRating" and proper setter and getter methods in class URLDisplayBean.java. In my jsp pages, I have the following line:

<bean:write name="URL_DISPLAY_BEAN" property="lRating" />. I have something similar before this line like:

<bean:write name="URL_DISPLAY_BEAN" property="area" />. Without adding the buggy line, the contents can be displayed proiperly. But after I added the line for "lRating" it complains about no getter method which I clearly I have in my URLDisplayBean.java. URL_DISPLAY_BEAN is added as an attribute for the request in my execute() as:

URLDisplayBean a = new URLDisplayBean();

request.setAttribute("URL_DISPLAY_BEAN", a);

Is there anything else I need to change?

[998 byte] By [fab3a] at [2007-11-27 8:12:07]
# 1

I take it you have the method "getLRating()" in your bean?

try getting the property "LRating" rather than "lRating"

Then go and take a look at the rules described in the java.beans.Introspector method decapitalize() and see if you can figure it out from there.

http://java.sun.com/j2se/1.5.0/docs/api/java/beans/Introspector.html

Cheers,

evnafets

evnafetsa at 2007-7-12 19:56:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2
Oh I see. Thanks very much.
fab3a at 2007-7-12 19:56:24 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...