I kep getting a
javax.servlet.ServletException: No getter method for property lastName of bean 
org.apache.struts.taglib.html.BEAN
error message when I try to call the below .jsp page.

I am sure I am using the gettter and setter methods with the correct names.

I have also tried calling the jsp property lastname with getter getLastname
and setter setLastname but it has not worked...

This is my .jsp file...

<%@ page language="java" %>
<%@ taglib uri="/WEB-INF/struts-bean.tld" prefix="bean" %>
<%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
<%@ taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<html>
<head><title>Submit Example</title></head>
<body>

<h3>Example Submit Page</h3>

<html:errors/>

<html:form action="submit.do">
Last Name: <html:text property="lastName"/><br>
Address: <html:textarea property="address"/><br>
Sex:     <html:radio property="sex" value="M"/>Male<br>
         <html:radio property="sex" value="F"/>Female<br>
Married: <html:checkbox property="married" /><br>
Age:     <html:select property="age">
          <html:option value="a">0-19</html:option>
          <html:option value="b">20-49</html:option>
          <html:option value="c">50-</html:option>
         </html:select>
         <html:submit/>
        </html:form>
</body>
</html>


*******************************************************************
*******************************************************************
and this is the ActionmForm subclass

package hansen.playground;

import javax.servlet.http.HttpServletRequest;
import org.apache.struts.action.*;

public final class SubmitForm extends ActionForm{

      /*Last name*/

      private String lastName = "LEM";

      public void setLastName( String lastName){
               this.lastName = lastName;
      }


      public String getLastName(){
         return this.lastName;
      }


      /* Address */

      private String address = null;
      public String getAddress(){
         return this.address;
      }

      public void setAddress( String address){
         this.address = address;
      }

      /* Sex */

      private String sex = null;
      public String getSex(){
         return this.sex;
      }

      public void setSex( String sex){
         this.sex = sex;
      }

      /* Married Status */
      private String married = null;
      public String getMarried(){
         return this.married;
      }

      public void setMarried( String married){
         this.married = married;
      }

      /* Age */
      private String age = null;
      public String getage(){
         return this.age;
      }

      public void setage( String arge){
         this.age = age;
      }
}







--

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]

Reply via email to