RE: no getter method found
> This is the "source code" that is being referenced > and it is correct. No it is not. The getter and setter methods are not named right. The correct naming was in my original response. -TPP > > public String getlastname(){ > > return this.lastName; > > } > > > > public void setlastname( String lastName){ > > this.lastName = lastName; > > } > > getLastname() > setLastname() - This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
I solved the problem... In my struts-config file inside the tag I was refering to the Action class instead of the ActionForm class and that was causing problem. "Kevin Bootz" <[EMAIL PROTECTED]To: "Struts Users Mailing List" <[EMAIL PROTECTED]> a.net> cc: Subject: RE: no getter method found 20/08/03 01:13 Please respond to "Struts Users Mailing List" All, This is the "source code" that is being referenced and it is correct. You may have a typo elsewhere in your code ? Are you sure you've set the environment per the tutorial instructions ? http://javaboutique.internet.com/tutorials/Struts/ -Original Message- From: Paananen, Tero [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:35 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found > Last Name: > > and this in my ActionForm subclass > > private String lastName = null; > > public String getlastname(){ > } > > public void setlastname( String lastName){ > } getLastname() setLastname() -TPP - This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. - 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] -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
in the method name first character after get or set should be captial, and while refering a property in jsp the first character should be small eg. if you have a bean property as . . . String lastName; String getLastName() { } void setLastName() { } . . . You will refer the property lastname in jsp as property="lastName" .. Deepak -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 20, 2003 12:03 AM To: 'Struts Users Mailing List' Subject: RE: no getter method found Try naming your methods public String getLastname() and public void setLastname() Regards, Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
Try naming your methods public String getLastname() and public void setLastname() Regards, Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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]
RE: no getter method found
All, This is the "source code" that is being referenced and it is correct. You may have a typo elsewhere in your code ? Are you sure you've set the environment per the tutorial instructions ? http://javaboutique.internet.com/tutorials/Struts/ -Original Message- From: Paananen, Tero [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:35 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found > Last Name: > > and this in my ActionForm subclass > > private String lastName = null; > > public String getlastname(){ > return this.lastName; > } > > public void setlastname( String lastName){ > this.lastName = lastName; > } getLastname() setLastname() -TPP - This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. - 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]
RE: no getter method found
try: Last Name: where the "N" in "name" is cap. -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:34 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found Actually, my last email was wrong, they should be: public String getLastName() and public void setLastName(); -Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
BTW: you probably should look at a JavaBean tutorial. What you state below is ABSOLUTELY wrong. Providing, of course you don't mean to include the two methods and have a param arg for set. Mark -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 4:08 PM Mark, I'm not sure which response you are referring to, but getLastname() and setLastname() is wrong if the member variable is called lastName. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
your post stated the method names as "getlastname" with the form property "lastname." Given your information, the correct JavaBean method signatures would be getLastname() and setLastname( String name ). period. Mark -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 4:08 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found Mark, I'm not sure which response you are referring to, but getLastname() and setLastname() is wrong if the member variable is called lastName. Mehran, basically, the property value of your html:text tag needs to match the name of the member variable in your form bean. If you have: private String lastname; in your form bean, then you should have a getter and setter called getLastname() and setLastname() and in your jsp you would have Since your member variable is called lastName, you should have a getter and setter called getLastName() and setLastName() and in your jsp you would have regards, Richard -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:56 AM To: 'Struts Users Mailing List' Subject: RE: no getter method found see my response to your last email -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:34 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found Actually, my last email was wrong, they should be: public String getLastName() and public void setLastName(); -Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
Mark, I'm not sure which response you are referring to, but getLastname() and setLastname() is wrong if the member variable is called lastName. Mehran, basically, the property value of your html:text tag needs to match the name of the member variable in your form bean. If you have: private String lastname; in your form bean, then you should have a getter and setter called getLastname() and setLastname() and in your jsp you would have Since your member variable is called lastName, you should have a getter and setter called getLastName() and setLastName() and in your jsp you would have regards, Richard -Original Message- From: Mark Galbreath [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:56 AM To: 'Struts Users Mailing List' Subject: RE: no getter method found see my response to your last email -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:34 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found Actually, my last email was wrong, they should be: public String getLastName() and public void setLastName(); -Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - 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]
RE: no getter method found
> Last Name: > > and this in my ActionForm subclass > > private String lastName = null; > > public String getlastname(){ > return this.lastName; > } > > public void setlastname( String lastName){ > this.lastName = lastName; > } getLastname() setLastname() -TPP - This email may contain confidential and privileged material for the sole use of the intended recipient(s). Any review, use, retention, distribution or disclosure by others is strictly prohibited. If you are not the intended recipient (or authorized to receive for the recipient), please contact the sender by reply email and delete all copies of this message. Also, email is susceptible to data corruption, interception, tampering, unauthorized amendment and viruses. We only send and receive emails on the basis that we are not liable for any such corruption, interception, tampering, amendment or viruses or any consequence thereof. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
This question comes up often enough that it probably warrants a short lesson in JavaBeans. If a property is named "lastname", the corresponding "getter" should be named getLastname() and the setter should be named setLastname(). What's more the parameter type for the "setter" must match the return type of the "getter". Please note: the name of the instance variable used for storing the lastname property value *is irrelevent*. The property name is derived from the names of the "getter & setter" methods alone (, unless you write a BeanInfo class, in which case, you get to make up your own rules.) For the sake of clarity, we often name our instance variables with the same name of the properties, but this is not required. For instance: public class MyForm extends ActionForm{ private String lastName = null; public String getLastname(){ return this.lastName; } public void setLastname( String lastName){ this.lastName = lastName; } } is the same as: public class MyForm extends ActionForm{ private String someFreakyName = null; public String getLastname(){ return this.someFreakyName ; } public void setLastname( String lastName){ this.someFreakyName = lastName; } } In both cases, the property name is "lastname", and so the proper tag usage is . For reference, see section 8.3 of the JavaBeans specification. http://java.sun.com/products/javabeans/docs/spec.html Steve -Original Message- From: Ditlinger, Steve [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 11:32 AM To: 'Struts Users Mailing List' Subject: RE: no getter method found public String getLastname(){} Note the capital "L" -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
see my response to your last email -Original Message- From: Yee, Richard K,,DMDCWEST [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 2:34 PM To: 'Struts Users Mailing List' Subject: RE: no getter method found Actually, my last email was wrong, they should be: public String getLastName() and public void setLastName(); -Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: no getter method found
getLastname() and setLastname() -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 9:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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]
RE: no getter method found
public String getLastname(){} Note the capital "L" -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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]
RE: no getter method found
Actually, my last email was wrong, they should be: public String getLastName() and public void setLastName(); -Richard -Original Message- From: Mehran Zonouzi [mailto:[EMAIL PROTECTED] Sent: Tuesday, August 19, 2003 6:55 AM To: [EMAIL PROTECTED] Subject: no getter method found I have the below in my jsp page Last Name: and this in my ActionForm subclass private String lastName = null; public String getlastname(){ return this.lastName; } public void setlastname( String lastName){ this.lastName = lastName; } But I keep getting the no gett found error message... No getter method for property lastname of bean org.apache.struts.taglib.html.BEAN What should the getter method be called? -- This e-mail may contain confidential and/or privileged information. If you are not the intended recipient (or have received this e-mail in error) please notify the sender immediately and destroy this e-mail. Any unauthorized copying, disclosure or distribution of the material in this e-mail is strictly forbidden. - 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]