![]() |
|||||||||||||||||
| |
|
|
|||||||||||||||
|
Summary
Lecture 2 Demo 1 ( Download )This extends the Application that we made in Tutes this week ( download completed project from here ). We change the Applcation so that the name variable is stored in Session.java instead of the individual components and thus we don't have to pass the value between pages. Sometimes this technique (dirctly passing a value from 1 page to the next ) is quite apropriate, however with something like the user's name we will want it no matter what page they are on in the site so using Session is the best approach. Lecture 2 Demo 2 ( Download )The next step is to create a User class and have the users details stored
in this class. So instead of a String inside session we have a instance
of the User class and set its name variable.
Page updated August 19, 2004 |
||||||||||||||||
|
|
|||||||||||||||||