how to maintain sessions in jsp?can you tellme the methods.
Answer Posted / murali mohan rao
first set the value in session using following methods
***Don't create the unnecessary Strings***
<%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 ? | 12 Yes | 3 No |
Post New Answer View All Answers
How can we handle the exceptions in jsp?
Why jsp is better over static html also explain lifecycle of a jsp?
Explain client-side and server-side validation.
What is the purpose of jsp and why it is widely used?
Why don’t we need to configure jsp standard tags in web.xml?
Explain JSP directives.
What are the implicit, internal objects and methods on the jsp page?
What is jsp custom tag and what are it’s components?
What is out println in jsp?
Which tag should be used to pass information from jsp to include jsp?
What is difference between html and jsp?
What is difference between custom jsp tags and beans?
Define scriptlet, expression and declaration in jsp?
What is the use of session management?
How do I run a jsp file?