how to maintain sessions in jsp?can you tellme the methods.

Answer Posted / asra

<%session.setAttribute("user","Murali");%>

Below statement you can use in any JSP to print the
welcome message. Start using JSP tags to better performance
and better coding.

Welcome to <%=session.getAttribute("user")%>

Is This Answer Correct ?    5 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How to configure init parameters for jsp?

486


What are the attributes on page directives?

514


Explain jsp and tell its uses?

535


Hi, I've applied for HPCL(Information System Officer)& UIIC (A).Plz send me previous/sample papers and any suggestions regarding this exam.Please advice me good study material or related links. Thanks in advance shyam shyamprasad71@gmail.com

1964


What is difference between sendredirect and forward?

481






How do I run a jsp file in linux?

538


What is jstl used for?

518


What jsp lifecycle methods can I override?

580


What are the differences between get and load methods?

514


Perform a browser redirection from a jsp page?

529


Can we define a class in a jsp page?

508


Can we use jstl in html?

462


How can you include the results of another page?

486


What is the use of?

537


How is jsp better than servlet technology?

549