I have repeated it a few times and would do it once again :-).
Do post your complete source code alongwith the problem you are facing.
Its not easy for anyone to guess the exact source code you have written by
only knowing the problem you are facing.
This would surely help you to get a solution from the list.
Have a nice day.
With regards,
Sachin S. Khanna
http://www.emailanorder.com
----- Original Message -----
From: Jann VanOver <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 02, 2001 4:52 AM
Subject: Re: Difference between bean.field and <jsp:getProperty name="bean "
property="field" />
> I'm not sure why it isn't working, but to be a "good" bean, your
attributes
> contract_id and payment_method should be private, not public. This
answers
> your original question -- <jsp:getProperty is MUCH preferred over
> beanname.propertyname because the latter does an end-run around the bean.
>
>
>
> -----Original Message-----
> From: BERWART Thierry [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 12:15 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Difference between bean.field and <jsp:getProperty
> name="bean " property="field" />
>
>
> Hi,
>
> I have already tested it but without success :/
>
> when I use
> <INPUT TYPE="text" NAME="payment_method" VALUE="<jsp:getProperty
> name="contract" property="payment_method" />" >
>
> it displays nothing in my textedit
> but when I use directly contract.payment_method, it works !!!
>
> Any ideas ? ;)
>
> Thierry
>
> -----Message d'origine-----
> De : Rishabh Agarwal [mailto:[EMAIL PROTECTED]]
> Envoyé : jeudi 26 avril 2001 8:51
> À : [EMAIL PROTECTED]
> Objet : Re: Difference between bean.field and <jsp:getProperty
> name="bean " property="field" />
>
>
> U have the method as getPayment_method(). U have to use:
>
> <INPUT TYPE="text" NAME="payment_method" VALUE=
> "<jsp:getProperty
> name="contract" property="Payment_method" />" >
> to get the correct value. Lemme know if it doesn't work.
>
> Rishabh.
>
> -----Original Message-----
> From: BERWART Thierry
> [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 26, 2001 2:27 PM
> To: [EMAIL PROTECTED]
> Subject: Difference between bean.field and
> <jsp:getProperty name="bean" property="field" />
>
> Hello,
>
> I have a JSP page and a bean.
> When I want to display some fields of this bean for
> editing,
>
> I used this :
>
> <INPUT TYPE="text" NAME="payment_method" VALUE=
> "<jsp:getProperty
> name="contract" property="payment_method" />" >
>
> but it display nothing as if "payment_method" is null or
> is
> "".
>
> I change this code with this :
>
> <INPUT TYPE="text" NAME="payment_method" VALUE= "<%=
> (contract.payment_method != null) ?
> contract.payment_method
> : "" %>"
> SIZE=30 MAXLENGTH=40>
>
> and it's working !!! it displays the value of the
> "payment_method" field
>
> Do you have an idea ?
> What is better to use ? bean.field or <jsp:getProperty
> ....
> ???
>
>
> Thanks you
>
> Thierry
>
>
> PS :
>
> A part of my bean :
>
> public class Contract {
>
> file://attributes
>
> private StringBuffer error_message = null;
>
> public Integer contract_id;
> .....
> public String payment_method;
> .....
>
> public String getPayment_method()
> {
> return payment_method;
> }
> public void setPayment_method(String
> newPayment_method)
> {
> payment_method = newPayment_method;
> }
>
>
===========================================================================
> 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