How to set and get sessions on JSP code ? | |||
| |||
save_my_name,jsp <% String name = request.getParameter( "username" ); session.setAttribute( "theName", name ); %> <HTML> <BODY> <A HREF="next_page.jsp">Continue</A> </BODY> </HTML> save_my_name.jsp saves the user's name in the session, and puts a link to another page, next_page.jsp. next_page.jsp shows how to retrieve the saved name. next_page.jsp <HTML> <BODY> Hello, <%= session.getAttribute( "theName" ) %> </BODY> </HTML> Tags: Display Monitor Power SC_MONITORPOWER Turn Monitor Off session.setAttribute | |||
| |||
| |||
Login for comment |
SIMILAR POSTS How to add a declaration on JSP code ? |
OTHER POSTS IN THE SAME CATEGORY How to resize image ? |