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

DynaValidatorActionForm - Cannot find bean...

 
Alessandro Ilardo
Ranch Hand
Posts: 218
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi there,
I'm using Struts 1.2.9 and to validate my form the DynaValidatorActionForm xml configuration.
But when I call the jsp which has the form I get the following error:


javax.servlet.jsp.JspException: Cannot find bean: "week" in any scope
at org.apache.struts.taglib.TagUtils.lookup(TagUtils.java:935)


14:12:00,060 ERROR [InsertTag] ServletException in '/WEB-INF/jsp/shift/form-datePicker.jsp': Cannot find bean: "week" in any scope
org.apache.jasper.JasperException: Exception in JSP: /WEB-INF/jsp/shift/form-datePicker.jsp:35

32: <html:hidden property="task" value="list"/>
33: <h3><bean:message key="label.select" arg0="la data"/></h3>
34: <label for="week">
35: <html:text name="week" property="week" styleClass="f-name" tabindex="1" />
36: <br />
37: <span class="error"><html:errors property="week"/></span>
38: </label>


Some reference





Thanks in advance for any help.

Regards
 
Merrill Higginson
Ranch Hand
Posts: 4864
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The problem is with the line:

in your JSP. In an html:text tag, the name should refer to the name of the form bean used by the JSP, or better yet, left out, because it defaults to the form bean name if omitted.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic