Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error 500--Internal Server Error javaxservlejspJspException No getter method for

 
bhuvan sundar
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
I have certain issue in using the bean.... The code of the bean is as follows...


public DoctypeBean()
{
}
public DoctypeBean(int id)
{
super(id);
}
public DoctypeBean(int id,String name)
{
super(id,name);
}
.....
public String getFormattedCreateDate()
{
if(createDate == null )
return "";
return EDMSUtil.dateFormatter.format(createDate);
}

public String getFormattedUpdateDate()
{
if(updateDate == null )
return "";
return EDMSUtil.dateFormatter.format(updateDate);
}
public String toString()
{
StringBuffer sb = new StringBuffer(super.toString());
sb.append(", Application name ").append(appName).append(", Has Topic ").append(hasTopic).append(", Topic Name ").append(topicName);
return sb.toString();

}
}


The above bean is set in the Action class as


request.setAttribute("listdoctype", list_doctype);


And it is called in the JSP as...

<logic:iterate id="Doctypedisplay" name="listdoctype" >

<bean:write name="Doctypedisplay" property="FormattedCreateDate"/>


<bean:write name="Doctypedisplay" property="FormattedUpdateDate"/>
</logic:iterate>

But Iam getting the following error ...

Error 500--Internal Server Error
javax.servlet.jsp.JspException: No getter method for property FormattedCreateDate of bean Doctypedisplay
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:1031)
at org.apache.struts.taglib.bean.WriteTag.doStartTag(WriteTag.java:227)
at jsp_servlet._webcontent._jsp.__listdoctypes._jspService(__listdoctypes.java:711)
at weblogic.servlet.jsp.JspBase.service(JspBase.java:33)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.RequestDispatcherImpl.forward(RequestDispatcherImpl.java:301)
at org.apache.struts.action.RequestProcessor.doForward(RequestProcessor.java:1056)
at org.apache.struts.action.RequestProcessor.processForwardConfig(RequestProcessor.java:388)
at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:231)
at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1164)
at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:415)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at weblogic.servlet.internal.ServletStubImpl$ServletInvocationAction.run(ServletStubImpl.java:971)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:402)
at weblogic.servlet.internal.ServletStubImpl.invokeServlet(ServletStubImpl.java:305)
at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:6350)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:317)
at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:118)
at weblogic.servlet.internal.WebAppServletContext.invokeServlet(WebAppServletContext.java:3635)
at weblogic.servlet.internal.ServletRequestImpl.execute(ServletRequestImpl.java:2585)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:197)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:170)

As IAm new to bean programming.... I think it is a very silly mistake...Kindly Reply fast..
Thank you in advance
Bhuvana
 
alan do
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
in your tag, <bean:write name="Doctypedisplay" property="FormattedCreateDate"/>,
change FormattedCreateDate to formattedCreateDate . the first letter of your property referring to your getter MUST BE lower case.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic