It's the javabean specification. Normally the methods "getFoo()" and "setFoo()" operate on the property "foo". The code doesn't really care what the property is called internally (it could even be calculated on the fly), but it infers the property name from the method name.
Normally variables in java begin with a lowercase letter. See Sun's java coding standard for more, or William Wake's "Java Coding Standard on One Page" http://www.xp123.com/xplor/xp0002f/index.shtml The method "getCheckPart()" will refer to a property named "checkPart". > -----Original Message----- > From: Francisco Exposito Aguilera [mailto:[EMAIL PROTECTED] > Sent: Wednesday, July 26, 2006 2:15 PM > To: user@struts.apache.org > Subject: RE: Error with c:for Each and c:out > > > Thanks a lot George!!!! It works. But I don´t understand > why... could you > tell me the reason, if there is a reason, for this lower-case > (in OTDEmpresa > the variable is Nombre, not nombre)? > > Also, if I have a parameter defined in OTDEmpresa called > CheckPart, all must > be in lower case or only the first character? > > PS: I am a beginner... you can see that :) > > > > > >From: <[EMAIL PROTECTED]> > >Reply-To: "Struts Users Mailing List" <user@struts.apache.org> > >To: <user@struts.apache.org> > >Subject: RE: Error with c:for Each and c:out > >Date: Wed, 26 Jul 2006 12:42:23 -0500 > > > >Assuming you have a method > > public String getNombre() > >in the class project.struts.OTD.OTDEmpresa, try > > <c:out value='${lee.nombre}'/> > >with a lower-case 'n'. > > > > > -----Original Message----- > > > From: Francisco Exposito Aguilera [mailto:[EMAIL PROTECTED] > > > Sent: Wednesday, July 26, 2006 10:35 AM > > > To: user@struts.apache.org > > > Subject: Error with c:for Each and c:out > > > > > > > > > Hi all, > > > > > > I am trying to show the results of a search from a > database into a > > > jsp page, but it doesn't work. > > > > > > If I add in the jsp file: > > > > > > <c:forEach items='${listarEmpresas}' var='lee'> > > > <tr><td><c:out value='${lee.Nombre}'/></td></tr> </c:forEach> > > > > > > where listarEmpresas is the parameter where is saved the > Collection > > > and Nombre is one of the fields from OTDEmpresas: > > > session.setAttribute("listarEmpresas",leeCollection); > > > > > > then I get: > > > > > > javax.servlet.ServletException: An error occurred while > evaluating > > > custom action attribute "value" with value "${lee.Nombre}": Unable > > > to find a value > > > for "Nombre" in object of class > "project.struts.OTD.OTDEmpresa" using > > > operator "." (null) > > > > > > If I add in the jsp file: > > > > > > <td><c:out value='${listarEmpresas}'/></td> > > > > > > then I get in a row of the created table: > > > > > > [EMAIL PROTECTED] > > > > > > Could anyone help me? > > > > > > Thanks a lot! > > > > > > _________________________________________________________________ > > > Descubre la descarga digital con MSN Music. Más de un millón de > > > canciones. http://music.msn.es/ > > > > > > > > > > -------------------------------------------------------------------- > > > - > > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > > >--------------------------------------------------------------------- > >To unsubscribe, e-mail: [EMAIL PROTECTED] > >For additional commands, e-mail: [EMAIL PROTECTED] > > > > _________________________________________________________________ > Acepta el reto MSN Premium: Protección para tus hijos en internet. > Descárgalo y pruébalo 2 meses gratis. > http://join.msn.com?XAPID=1697&DI=1055&HL=Footer_mailsenviados _proteccioninfantil --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]