"Allamsetty, Venkata" wrote:
> > Hi,
> >
> > I am trying to get my first Struts application work.
> > I have created defaultTime.jsp which contains a text input for time,
> > DefaultTimeForm , EditDefaultTimeAction and SaveDefaultTimeAction classes.
> > Defined web.xml and struts-config.xml and deployed them appropriately.
>
You are not showing us the JSP page or struts-config.xml file that is running,
but I suspect the problem is one of the following:
* You are creating the bean in one scope, but looking for it in a different
scope.
* You are creating the bean in request scope, and looking for it on a
later request (request scope beans only survive through the current
request).
> >
> > But when I try loading it, I get Error 500.
> > and the message is
> >
> > javax.servlet.jsp.JspException: No bean found under attribute key
> > defaultTimeActionForm
> > at
> > org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.jav
> > a:214)
> > at
> > org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
> > at
> > org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTa
> > gBase.java:218)
> > at jsp_servlet._defaulttime._jspService(_defaulttime.java:85)
> > at weblogic.servlet.jsp.JspBase.service(JspBase.java:27)
> >
> If I try loading the editDefaultAction.do directly, I get the
> follwing error.
>
> javax.servlet.jsp.JspException: Exception accessing property action
> for bean defaultTimeActionForm: java.lang.NoSuchMethodException: Unknown
> property 'action'
If your bean includes property="action", the tag is going to try to call the
getAction() method on whatever bean was selected by the "name" (and optional
"scope") attributes. Does the bean have such a method?
>
> at
> org.apache.struts.taglib.logic.CompareTagBase.condition(CompareTagBase.java:
> 234)
> at
> org.apache.struts.taglib.logic.EqualTag.condition(EqualTag.java:90)
> at
> org.apache.struts.taglib.logic.ConditionalTagBase.doStartTag(ConditionalTagB
> ase.java:218)
> at
> jsp_servlet._defaulttime._jspService(_defaulttime.java:85)
>
> Any hints or suggestions?
>
> thanks
>
> > Venkata Allamsetty
> >
Craig