Hi ,

Please go through the code , this code works ..but I 've a doubt in this.

<jsp:useBean id="languageBean" scope="page" class="LanguageBean">
</jsp:useBean>

<jsp:setProperty name="languageBean" property="*"/>

<p>Hello,<jsp:getProperty name="languageBean" property="names"/>.</p>
<p>Your favourite language is:
<jsp:getProperty name="languageBean" property="languages"/>.</p>
<p>My comments on your language:
<jsp:getProperty name="languageBean" property="languageComments"/>.</p>

---------------------------------
Below is the bean

public class LanguageBean{
 private String name;
 private String language;

public LanguageBean(){}

public void setnames(String name){
 this.name=name;
}

public void setlanguages(String language){
 this.language=language;
}

public String getnames(){
 return name;
}

public String getLanguages(){
 return language;
}

public String getLanguageComments(){
 if(language.equals("Java"))
  return "The King of OO Languages";
 else if(language.equals("C++"))
  return "I know this!!";
 else if(language.equals("C"))
  return "You don't stand a chance";
 else
  return "I don't know";
}
}


My question :
The Bean has method getnames() so the below tag works
<jsp:getProperty name="languageBean" property="names"/>

but the bean has method getLanguages()
<jsp:getProperty name="languageBean" property="languages"/>
the property for the above tag starts with 'l' and not with 'L'

if I change the property for the first tag to Names , it does not work

similar is the case for the third tag .
Two parameters  1) names and 2) languages are passed from a html page to the
jsp ( the case of the parameters are as i've given)

could anyone please clear me this doubt

Thanks.

Madhan .M.Srinivasan

===========================================================================
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://archives.java.sun.com/jsp-interest.html
 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.jsp
 http://www.jguru.com/faq/index.jsp
 http://www.jspinsider.com

Reply via email to