I've found I have to use the value of the private variable name in the bean,  ie. if 
the
private var is issuename, setting property to issuename works but using the issueName
suffix on the getter does not work. I don't understand why, unless its some kind of 
case
issue.

 Dave.


----- Original Message -----
From: "Daryani Santosh" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, September 22, 2000 8:50 PM
Subject: Re: Problem with getProperty


> getProperty property name must be identical to the elment name on the form , it
> they are differently spelled or have a different case getProperty cannot find it
> and returns null
>
> Santosh
>
>
>
>
>
>
> Gopi Mandava <[EMAIL PROTECTED]> on 09/22/2000 03:16:32 PM
>
> Please respond to A mailing list about Java Server Pages specification and
>       reference <[EMAIL PROTECTED]>
>
> To:   [EMAIL PROTECTED]
> cc:    (bcc: Santosh Daryani/IT/Aon Consulting)
>
> Subject:  Problem with getProperty
>
>
>
> Hi,
>
> <jsp:getProperty name="issue" property="issueName"/> is always returning a
> null in the following case(when I iterate through a list and set the value
> of the bean). But it works fine if I just call the get method on the bean.
> Here is the jsp code:
>
> I'm running Tomcat 3.0 and JDK 1.3 on a Linux RedHat 6.2
>
> ------------------------
>
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
>
> <%@ page import="java.util.*" %>
> <%@ page import="Issue" %>
>
> <%@ page errorPage="error.jsp" %>
>
> <jsp:useBean id="issue" class="Issue" scope="request" />
>
> <html>
> <body>
>
> <form action=IssueEditServlet>
>
> <TABLE BORDER="0" CELLSPACING="1" CELLPADDING="3" WIDTH=650>
> <TR>
> <TD ALIGN="LEFT">Issue</TD>
> <TD ALIGN="LEFT">Description</TD>
> </TR>
> <%
>          ArrayList issues = (ArrayList) request.getAttribute("issues");
>          Iterator iterator = issues.iterator();
>          while (iterator.hasNext())
>          {
>                  issue = (Issue) iterator.next();
> %>
>
> <TR>
>
> <!-- DOESN'T WORK -->
> <TD class="data" ALIGN="LEFT"><jsp:getProperty name="issue"
> property="issueName"/></TD>
>
> <!-- WORKS FINE -->
>
> <TD class="data" ALIGN="LEFT"><%= issue.getIssueName() %></TD>
>
> </TR>
>
> <%}%>
>
> </table>
>
> <center>
> <br><input type=submit name=action value="Update">
> </center>
> </form>
>
> </body>
> </html>
> ----------------------
>
> Thanks,
> Gopi
> -----------
> Gopi Mandava                            (703) 267-1735 x307
> CoManage Inc.
>
> "The pedestrian had no clue which way to go, so I ran him over"
>          - a real statement from an insurance form
>
> ===========================================================================
> 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
>

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