I was mulling over this a bit more, and some more things dropped out:

What JSP container are you using? If my supposition was correct, *most*
containers will tell you that the bean referenced from <jsp:getProperty />
didn't exist; I don't know specifically of any that don't, but it's possible
that the error lies there.

I'm also not sure what the implications are of using the underscore in the
property name. That *shouldn't* cause a problem, but just because it
shouldn't doesn't mean that it doesn't. (See "What JSP container are you
using?" :)

Another alternative is the use of taglibs to populate your forms, to move
the problem elsewhere. I have a form taglibrary for this; so does Struts,
and jakarta has yet another one (although Shawn Bayern's isn't built for
populating form data from a bean the way you're doing it.)


>From: Joseph Ottinger <[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="fi
>Date: Wed, 2 May 2001 10:13:37 -0500
>
>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

_________________________________________________________________
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