Donghyeok Kang wrote: > Hi, > > I'm using the JSTL library from the jakarta project. > > I have some bean class that has the propery named > "qSeqNumber" and the getter method named "getQSeqNumber". > > When I use the bean class in JSTL like > "${question.qSeqNumber}", an exception occurred such as > > javax.servlet.ServletException: An error occurred while evaluating > custom action attribute "value" with value "${question.qSeqNumber}": > Unable to find a value for "qSeqNumber" in object of class > "SurveyQuestion" using operator "." (null) > > But, When I use the expression "${question.QSeqNumber}" > instead, it works well. > > I know the property names of the bean class start with > the lower case character. > > What's wrong?
You've run into an exception to the regular JavaBeans naming rules. Like you said, in the normal case, the property name starts with a lower case character, e.g. "foo" corresponds to "getFoo()". But if the getter method name has more than one capital character after "get" (e.g. "getQSeqNumber()" in your case), the case is preserved in the property name. Hence, in your case the property name is "QSeqNumber". If you want the property name to be "qseqNumber" rename the getter method to "getQseqNumber()". Hans -- Hans Bergsten [EMAIL PROTECTED] Gefion Software http://www.gefionsoftware.com JavaServer Pages http://TheJSPBook.com =========================================================================== To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST". For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST". Some relevant FAQs on JSP/Servlets can be found at: http://archives.java.sun.com/jsp-interest.html http://java.sun.com/products/jsp/faq.html http://www.esperanto.org.nz/jsp/jspfaq.jsp http://www.jguru.com/faq/index.jsp http://www.jspinsider.com