"Alex A. Almero" wrote:
>
> the two codes are working properly the other samples while the code below seems to 
>have problem.
> see code below.
> <%@ page import="java.util.*,com.taglib.wdjsp.arch.*"  %>
> <jsp:useBean id="employee" class="com.taglib.wdjsp.arch.EmployeeBean" 
>scope="request"/>
> <jsp:setProperty name="employee" property="*"/>
> <html>
> <body>
> <b>Current Employees</b>
> <ul>
> <%
>   Vector v = (Vector)request.getAttribute("list");
>   Iterator i= v.iterator();
>   while (i.hasNext()) {
>      employee = (EmployeeBean)i.next();
>   System.out.println(employee.getId());
>   System.out.println(employee.getFirstName());
>   System.out.println(employee.getLastName());
> %>
> <li>
> <a href="./fetch?cmd=get&id=
> <jsp:getProperty name="employee" property="id"/>">
> <jsp:getProperty name="employee" property="lastName"/>,
> <jsp:getProperty name="employee" property="firstName"/>
>
> <% } %>
> </ul>
> </body>
> </html>
>
> pls. advise thanks

I assume that the problem you refer to is that the <jsp:getProperty> actions
don't display any values? The reason is that you set the scripting
variable named "employee", but the <jsp:getProperty> action can not read
a scripting variable; it only deals with objects kept in one of the JSP
scopes. For more about this, see Tips 7 in an article I wrote for O'Reilly:

  <http://java.oreilly.com/news/jsptips_1100.html>

Hans
--
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
Author of JavaServer Pages (O'Reilly), http://TheJSPBook.com

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
For digest: mailto [EMAIL PROTECTED] with body: "set JSP-INTEREST DIGEST".
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