how to maintain sessions in jsp?can you tellme the methods.
Answer Posted / brindha.d
using session oject in jsp.
first u set using following methods
String name="ravi";
session.setAttribute("user",name);
using retrive method
String sessionuser=session.getAttribute(name);
out.println("welcome"+sessionuser);
u give this last 2 stmts in all jsp pages. it will
display as "Welcome ravi".
| Is This Answer Correct ? | 121 Yes | 55 No |
Post New Answer View All Answers
Why we use jsp instead of html?
What is jsp expression?
HOW CAN WE COMPARE TWO PDF FILES USING JSP ?
A jsp page, include.jsp, has a instance variable "int a", now this page is statically included in another jsp page, index.jsp, which has a instance variable "int a" declared. What happens when the index.jsp page is requested by the client?
How to configure init parameters for jsp?
How many types of jsp tags are there?
What is jsp page?
List the various action tags used in jsp.
What are the main tags in jsp?
Is jsp server side or client side?
How to create menu in jsp with example?
How can I override the jspdestroy() method within a jsp page?
How can we create jsp custom tags?
What is JTGrid?
Why is jsp used for?