jQuery in Action, 2nd edition*
The moose likes Struts and the fly likes error in my struts application no getter methods Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "error in my struts application no getter methods " Watch "error in my struts application no getter methods " New topic
Author

error in my struts application no getter methods

sahana mithra
Ranch Hand

Joined: Oct 26, 2010
Posts: 72
Here is my entire code.





[img]
ApplicationResource.properties
Employee_Details.title=Employee Details
prompt.id=Employee ID
prompt.name=Employee Name
prompt.salary=Employee Salary
button.submit=submit
button.reset=reset

error.EmpName.required = User Name is required.
error.EmpId.required = Password is required.
error.EmpSal.required = Salary is required[/img]

















I get only the below error. Please help me
[img]HTTP Status 500 -

--------------------------------------------------------------------------------

type Exception report

message

description The server encountered an internal error () that prevented it from fulfilling this request.

exception

org.apache.jasper.JasperException: javax.servlet.ServletException: javax.servlet.jsp.JspException: No getter method for property: "EmpID" of bean: "employeeForm"
org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:491)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:401)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.ServletException: javax.servlet.jsp.JspException: No getter method for property: "EmpID" of bean: "employeeForm"
org.apache.jasper.runtime.PageContextImpl.doHandlePageException(PageContextImpl.java:862)
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImpl.java:791)
org.apache.jsp.Employee_005fDetails_jsp._jspService(Employee_005fDetails_jsp.java:115)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


root cause

javax.servlet.jsp.JspException: No getter method for property: "EmpID" of bean: "employeeForm"
org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:987)
org.apache.struts.taglib.html.BaseFieldTag.prepareValue(BaseFieldTag.java:121)
org.apache.struts.taglib.html.BaseFieldTag.renderInputElement(BaseFieldTag.java:102)
org.apache.struts.taglib.html.BaseFieldTag.doStartTag(BaseFieldTag.java:81)
org.apache.jsp.Employee_005fDetails_jsp._jspx_meth_html_005ftext_005f0(Employee_005fDetails_jsp.java:256)
org.apache.jsp.Employee_005fDetails_jsp._jspx_meth_html_005fform_005f0(Employee_005fDetails_jsp.java:179)
org.apache.jsp.Employee_005fDetails_jsp._jspService(Employee_005fDetails_jsp.java:105)
org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:377)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:313)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:260)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)


note The full stack trace of the root cause is available in the Apache Tomcat/6.0.29 logs.


--------------------------------------------------------------------------------

Apache Tomcat/6.0.29[/img]
Dheeraj dubey
Greenhorn

Joined: Sep 28, 2007
Posts: 8
In your GradeForm class

instate of



Use



sahana mithra
Ranch Hand

Joined: Oct 26, 2010
Posts: 72
Hi,
I changed as you told but still its not working...
Reyaz Ahmed
Greenhorn

Joined: Jan 28, 2011
Posts: 3
The name of the attribute in ActionForm must start with small letter like in this case

public class GradeForm extends ActionForm{

private static final long serialVersionUID = 1L;
private String empID;
private String empName;
private int empSal;

// and after that generate the getter and setter of the above attribute

}

I think it will solved your problem


 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: error in my struts application no getter methods
 
Similar Threads
ERROR :: cannot find ActionMappings or ActionFormBeans
a question about struts....please help
Can you help a STRUTS newbie?
org.apache.jasper.JasperException: Unable to load class for JSP
java.lang.NullPointerException in a simple servlet