wood burning stoves 2.0*
The moose likes Struts and the fly likes Error 500--Internal Server Error javaxservlejspJspException No getter method for Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Error 500--Internal Server Error javaxservlejspJspException No getter method for" Watch "Error 500--Internal Server Error javaxservlejspJspException No getter method for" New topic
Author

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

bhuvan sundar
Ranch Hand

Joined: Mar 02, 2005
Posts: 104
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

Joined: Apr 14, 2005
Posts: 354
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.


-/a<br />certified slacker...yes, my last name is 'do' - <a href="http://www.luckycouple.com" target="_blank" rel="nofollow">luckycouple.com</a>
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: Error 500--Internal Server Error javaxservlejspJspException No getter method for