This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes html:options? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "html:options?" Watch "html:options?" New topic


pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
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


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" />

Failure is not when you fall down; its only when you fail to get up again.
Aparna Sharma
Ranch Hand

Joined: Mar 12, 2003
Posts: 30
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.


Aparna Sharma<br />SCJP 1.4 (yippeeee!)
pradeep arum
Ranch Hand

Joined: Oct 01, 2003
Posts: 130
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.
subject: html:options?
Similar Threads
Validation of Html options
How to retrieve property and labelProperty info from action class
html:options values getting appended
mapping between JSP n form
Problem with the drop down box using Struts tags