In your code. bean is not a "Bean" that can be used with getProperty. Only
Beans created via a useBean can be used with getProperty.

What happens when you put

<%= bean.name() %>

there instead?

> -----Original Message-----
> From: A mailing list about Java Server Pages specification and reference
> [mailto:[EMAIL PROTECTED]]On Behalf Of ethan
> Sent: Wednesday, October 04, 2000 7:17 PM
> To: [EMAIL PROTECTED]
> Subject: why my getProperty does not work?
>
>
> Hi,
> Could someone explain why my getProperty does not work? here the code. The
> select keeps showing null.
> Thanks for your help!!
>
> <%@page import="com.repository.*" errorPage="error.jsp" %>
> <jsp:useBean id="bean" class="KeyBean"  scope="request" />
>
> ... html code ...
>                         <select size="1" name="manufacturer" tabindex="1"
> >
>                                 <option> All </option>
> <%
>                     beans = (KeyBean[]) request.getAttribute("manu");
>                     if (beans != null)
>                     {
>                         for(int i =0;i < beans.length; i++)
>                         {
>                                bean = beans[i];
> %>
>                               <Option>
>                               <jsp:getProperty name="bean" property="name"
> />
>                               </option>
> <%
>                         }
>                     }
> %>
>                             </select>
>
> ==================================================================
> =========
> To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
> JSP-INTEREST".
> Some relevant FAQs on JSP/Servlets can be found at:
>
>  http://java.sun.com/products/jsp/faq.html
>  http://www.esperanto.org.nz/jsp/jspfaq.html
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
>  http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets
>

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to