• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 354
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
It is difficult to free fools from the chains they revere - Voltaire. tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic