Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

html:options?

 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi all ,
i am trying to give this tag nested in a html:select , a collection which is a vector and it says

Cannot find bean under name org.apache.struts.taglib.html.BEAN
this is the code

thanks

<%
java.util.Vector arr= (java.util.Vector)session.getAttribute("collectionObject");
int siz=arr.size();
pageContext.setAttribute("selectData", arr);
%>
the size is<%=siz%>
<html:select property="mySelect">
<html ptions collection="selectData" property="value" />
</html:select>
</html>
 
Aparna Sharma
Ranch Hand
Posts: 30
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am a beginner with Struts and what I think as a solution might not be applicable to your situation.

But I have got the same error msg many times and I think the following things resolved it(for me).

1. check whether your jsp can see your actionform,valueobject(javabean) etc
2. create a formbean(or actionform , i dont know if there is any difference b/w these terms) for the page you are trying to display or use a dynaactionform/dynavalidator form.

HTH,
Aparna
 
pradeep arum
Ranch Hand
Posts: 130
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi aparna,
i know it is possisible with a form bean, but i want to strip all that and use a simple ArrayList. and get the contents from the ArrayList.please find a way for this kind of scenario.
thanks
Pradeep
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic