There is no problem with the database operation.  Data
are retrieved and can be displayed using the
<c:forEach ....> tag.  Now, it is the drop-down menu.

I have coded some drop-down menu before.  This time, I
have a collection of JavaBeans instead of a collection
of strings.  And, I am in trouble again.

I passed a collection of JavaBean(s) upon successful
completion of an action:

        Collection pages = service.getPages();
        request.setAttribute( "PageBeans", pages );

The individual JavaBean in the Collection is called
PageBean.  The PageBean has only one property called
'name' (I made it simple for testing purpose) with the
get and set methods.  

In the listpages.jsp, I imported:

<%@ page import="org.dhsinfo.content.PageBean" %>

<%@ taglib uri="/tags/struts-html" prefix="html" %>
<%@ taglib uri="/tags/struts-bean" prefix="bean" %>

To form a drop-down menu, I did:

<bean:define id="nameList" name="PageBeans"
scope="request" type="java.util.ArrayList"  />

<html:select size="1" property="anything"
multiple="false">
    <html:options collection="nameList"
property="name" labelProperty="name"/>
</html:select>

I got this error:
Http Status 500 root cause 

javax.servlet.jsp.JspException: Cannot find bean under
name org.apache.struts.taglib.html.BEAN

and in the Tomcat logs file:

2004-09-20 12:03:38 ApplicationDispatcher[/DHSInfo]
Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Cannot find bean under
name org.apache.struts.taglib.html.BEAN


                
__________________________________
Do you Yahoo!?
Yahoo! Mail - 50x more storage than other providers!
http://promotions.yahoo.com/new_mail

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to