Could it be a case sensitivity issue? Exception: > jsp threw exception > org.apache.jasper.JasperException: Cannot find a method to read property > 'carYear' in a bean of type 'QuoteCalculationBean' refers to property "carYear"
Method: > properties it can't find. In the case of carYear they are: > int getCarYear(); refers to property "CarYear" Colin ----- Original Message ----- From: "Raghupathy, Gurumoorthy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, December 06, 2001 10:37 AM Subject: Re: <jsp:getProperty() ...> problems > you should call it getCarYear and not carYear ( the first charector are diff > ).. > may be this is the problem... > guru > > -----Original Message----- > From: Chris Tucker [mailto:[EMAIL PROTECTED]] > Sent: 06 December 2001 18:13 > To: [EMAIL PROTECTED] > Subject: <jsp:getProperty() ...> problems > > > I'm probably missing something very obvious here, but it's got me flummoxed > right now. I'm running Tomcat 4.01, JDK 1.3.1_01, and I'm having trouble > with exceptions when trying to read Bean properties: > > 2001-12-06 09:52:24 StandardWrapperValve[jsp]: Servlet.service() for servlet > jsp threw exception > org.apache.jasper.JasperException: Cannot find a method to read property > 'carYear' in a bean of type 'QuoteCalculationBean' > > I've been having this problem in an intermittent fashion within this > particular Bean (not seen it in others => almost certainly my fault!) on > various different properties. There are appropriate get/set methods for the > properties it can't find. In the case of carYear they are: > int getCarYear(); > void setCarYear(int v); > void setCarYear(String v); > The problem always occurs for a given property (i.e. it is intermittent in > which properties it affects, not in when it gets called -- if a property > fails, it always fails. However, the failing properties change sometimes > when the Bean is changed. Perhaps intermittent is the wrong word.) > > > The Bean has a no-args constructor (I would post the code to the Bean, but > it's a bit sizable). Some of the properties work correctly, and the version > of the Bean it is using is definitely up-to-date (I've stopped Tomcat, > erased everything under the work/myapp tree and everything under > webapps/myapp, and then redeployed a new version and restarted Tomcat). On > the instance of Tomcat I execute locally, on a Win2k box, it has no problem > with property carYear, but does have trouble with other properties. On the > instance of Tomcat on the "main" server, a Win NT box, it fails on carYear > but succeeds on other properties (both are running exactly the same version > of Tomcat/JDK and have identical copies of the webapp/myapp folder). In > both cases I can successfully read the properties of the Bean using <%=%> > tags (e.g. <%= mybean.getCarYear() %> returns the right value with no > problems). Thus, the problem would appear to lie with the introspection > mechanism, of which I know (very) little. > > Anybody have any ideas? > > --Chris Tucker > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > > ___________________________________________________________________________ > To unsubscribe, send email to [EMAIL PROTECTED] and include in the body > of the message "signoff SERVLET-INTEREST". > > Archives: http://archives.java.sun.com/archives/servlet-interest.html > Resources: http://java.sun.com/products/servlet/external-resources.html > LISTSERV Help: http://www.lsoft.com/manuals/user/user.html > ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
