I too had this problem. Check the following in your bean code.

Assume that your property name is empno.

Check if the get() and set() property functions use the same datatype.

ex
        public int getEmpno(){ //note the uppercase E
and
        public void setEmpno(int arg){

and in jsp you will give,
        <jsp:setProperty name="bean_instance" property="empno"/>

if you have put public void setempno or setEmpno(String arg)
it will not work. The jsp page will give an error that it cannot find the
property.

Regards,
Nagaraj.

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Steven and Susan Hirsch
Sent: Sunday, December 03, 2000 3:42 AM
To: [EMAIL PROTECTED]
Subject: (bean.getId() works but <jsp:getProperty name="bean"
property="id"/> doesn't!!)


This is driving me nuts!!  I can get a beans attribute in a jsp page by
directly calling the accessor method, but cannot get the value via the
<jsp:getProperty> tag!

This works:

<%= contacts.getId() %>

but this doesn't:
<jsp:getProperty name="contacts" property="id" />

Any ideas?  The jsp is recognizing the bean, I don't have any compilation
errors.

Steven  Hirsch

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

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