Using <html:multibox> struts error: org.apache.struts.taglib.html.BEAN does not view

hi,

i am trying to create a number of checkboxes at the and of rows of data to allow you to select a number of rows and then hit a submit button that will call an action. When the <html:multibox> tag is used the page doesnot load and give the error:

"Cannot find bean under name org.apache.struts.taglib.html.BEAN "
here is my code:
JSP:-

<c:choose>
   <c:when test="${pageObject.surveyId == '104'}">
      <html:multibox property="resultId">
          <c:out value="${pageObject.id}"/>
      </html:multibox>
   </c:when>
</c:choose>

which is enclosed in a form calling allocateResource.do with a submit button.

ACTION FORM:-
public class AllocateResultsForm extends ActionForm {
      private String[] resultId ={};
     
       public String[] getResultId() {
      return resultId;
       }

       public void setResultId(String[] strings) {
              resultId = strings;
       }

}

Thanks for you help in advance.


RosscowieAsked:
Who is Participating?
 
evnafetsCommented:
>Cannot find bean under name org.apache.struts.taglib.html.BEAN

The standard cause of this error message is that you have not got an <html:form> on your page.
When you use a struts html component and specify only a property, it looks for the property on the backing form bean.  So this multibox tag needs to be nested within an <html:form>

Cheers,
evnafets
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.