I am having the same problem. The getProperty tag is not working for some
pages. However, pages within another project can use the getProperty tag
perfectly. I think it has something to do with the configuration of the Web
Application.

I am running under Tomcat 3.1

-Greg Ball

-----Original Message-----
From: Kowaleski, Michael [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, August 15, 2000 4:58 PM
To: [EMAIL PROTECTED]
Subject: jsp:getProperty


the jsp:getProperty tags are not returning the bean property values.  here
is a synopsis of my code:

- my servlet creates an array of beans
- using request.setAttribute(), it passes the bean array to my .jsp page
- .jsp page contains the following code

<jsp:useBean id="content" scope="request" class="Bean" />
<table width="100%" border="1" cellpadding="0" cellspacing="0">

<%
     Bean[] contents = ( Bean[] )request.getAttribute( "attribute" );

    for ( int count = 0; count < contents.length; count++ )
    {
        content = contents[count];
%>
    <tr>
        <td><jsp:getProperty name="content" property="subject" /></td>
        <td><jsp:getProperty name="content" property="title" /></td>
    </tr>
<%
        }
<%
    }
%>
...

for results, i see the table that's built, and the cells, but no values.  if
i replace the getProperty tags w/ the explicit methods, i.e.
content.getSubject(), it works.  in addition, if i use the getProperty tag
and return a static string in my bean, the static string displays, but not
the bean property.  for example,

public String getSubject( ) {
        return this.subject + "hello there";
}

using the getProperty tag, this would return hello there.

this design follows the examples found in the web development with
javaserver pages book by fields & kolb.

any help would be appreciated...

===========================================================================
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