| ★ wanayoo — archive 1999 http://developer.java.sun.com/developer/qow/ | Nouvelle recherche | Portail wanayoo |
|
|
Question of the Week No. 100Researched by Dan GrossQuestion of the Week presents answers to key questions posed by the developer community. The intent is to pass this important, but not always easy-to-find, information on to Java Developer ConnectionSM (JDC) members. The questions are selected from the JDC Forums generally because: they are frequently asked, they are significant or timely, or the answers are not easily accessible.
In a JavaServer PageTM (JSP), I see the "*" in the
The JSP If you have: <jsp:setProperty name="mybean" property="*" />and you have the following Submit buttons: <INPUT TYPE ="TEXT" NAME="login" value=""> <INPUT TYPE ="PASSWORD" NAME="password" value="">Then you would have to write a corresponding method in the bean with the same name:
public String value;
public String password;
void setLogin(String value){
login = value;
}
void setPassword(String value){
password=value;
}
Note that in the setLogin, the "L" is capitalized. This is crucial. If
this is not capitalized in the bean, then the setProperties will not
automatically call the method in the bean.
For more information:
JSP Architecture Quiz, including source code, which uses Many thanks to JDC member chetan and mozkill for contributing to this answer. Note: If you have a question to which you need an answer, try the JDC Forums. You can read through the existing topics, or with your free JDC membership, you can post new messages or threads.
Please post new questions to the JDC Forums. See what other members have said.
|