I didn't see the original message in this thread, so I'm missing some
important information - but it LOOKS like you didn't put the bean in the
page context, via <jsp:useBean />. In JSP, you can use local declarations as
such:

<% myClass bean=new myClass(); %>

... which doesn't put the bean in the page context - just in the current
method. Thus, the sequence:

<% myClass bean=new myClass(); %>
<jsp:getProperty name="bean" property="prop" />

...will and should fail.

The answer is, as stated, to use <jsp:useBean />. The following snippet is
nearly equivalent to the previous snippet, with the exception of being
correct:

<jsp:useBean id="bean" type="myClass" />
<jsp:getProperty name="bean" property="prop" />

Again, this is the *common* cause for this kind of problem. It may be that
there's another issue that the source would reveal.

>From: BERWART Thierry <[EMAIL PROTECTED]>
>Reply-To: A mailing list about Java Server Pages specification and
>     reference <[EMAIL PROTECTED]>
>To: [EMAIL PROTECTED]
>Subject: Re: Difference between bean.field and <jsp:getProperty name="bean
>             " property="field" />
>Date: Wed, 2 May 2001 16:38:09 +0200
>
>I just use <%= bean.getField() %> instead of <jsp:getProperty
>name="bean" property="field" />
>
>I didn't find the error but now all is working ;)
>
>Thierry
>
>-----Message d'origine-----
>De : Sadanand Mn [mailto:[EMAIL PROTECTED]]
>Envoy� : mercredi 2 mai 2001 15:47
>� : [EMAIL PROTECTED]
>Objet : Re: Difference between bean.field and <jsp:getProperty
>name="bean " property="field" />
>
>
>Then please let us also know what is the solution , surely it will help
>us
>cheers
>
>========================================================================
>===
>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

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.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