天天看點

save username in session and then retrieve username from session

The target of the form is "SaveName.jsp", which saves the user's name in the session.  Note the variable  "session".  This is another variable that is normally made available in JSPs, just like out and requestvariables.  (In the @page directive, you can indicate that you do not need sessions, in which case the "session" variable will not be made available.)

The SaveName.jsp saves the user's name in the session, and puts a link to another page, NextPage.jsp.

NextPage.jsp shows how to retrieve the saved name.

下一篇: users