reset password
Author Message
Vanquish39
Posts: 134
Posted 22:30 Apr 20, 2011 |

Professor I'm confused on one thing on today's lecture.  How is the username and password being passed to the UserManager in Users.jsp?  As in, how is it getting passed into the setAddUser method?


Also for the lab1, when you say property are you saying that at we must instantiate one in the class? 

Example:  currentTestEntryIndex


private int currentTestEntryIndex

public int getCurrentTestEntryIndex(){

}

Last edited by Vanquish39 at 22:32 Apr 20, 2011.
cysun
Posts: 2935
Posted 22:42 Apr 20, 2011 |

1. The values of username and password are passed to the bean by the line <jsp:setProperty name="um" property="*" />, and the next line invokes setAddUser() to create a user object.

2. A property is defined by getter and/or setter, not class variable, so you don't have to have a class variable; however, in this particular case I think you do need one to keep track of which test entry is currently displayed.

Vanquish39
Posts: 134
Posted 22:46 Apr 20, 2011 |

yes, that's exactly what I thought.  I needed to hold a currentTestEntryIndex