hi,
I was not able to find the set property.
U have to first set the proprty before getting it.
use the setProperty directive or call the func.
using scriplets.
Hope it helps
-anurag


--- cupid1 <[EMAIL PROTECTED]> wrote: > Hello every
one,
>
> Please help with a small problem. I have this jsp
> code that I saved in
> public_html file in jws2.0.
>
> <html>
>
> <jsp:useBean id="mybean" class="hello.NameHandler"
> />
>
> <h1>
> Hello, <jsp:getProperty name="mybean"
> property="username" />!
> </h1>
>
> </html>
>
> Following is my Bean which is stored in
> classes\hello folder of jws2.0. It
> is in classpath.
>
> public class NameHandler {
>
>  private String username;
>
>  public NameHandler() {
>   username = "John Doe";
>  }
>
>  public void setUsername( String name ) {
>   username = name;
>  }
>
>  public String getUsername() {
>   return username;
>  }
> }
>
> when I test the jsp it gives me following result:
>
> Hello, !
>
> while I expect
>
> Hello, John Doe!
>
> could any one tell me what is wrong? Thanks.
>
> shuaib
>
>
===========================================================================
> 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


____________________________________________________________
Do You Yahoo!?
Get your free @yahoo.co.uk address at http://mail.yahoo.co.uk
or your free @yahoo.ie address at http://mail.yahoo.ie

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