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
What are custom tags?
Explain client-side and server-side validation.
What are page directives?
Explain the difference between forward and sendredirect?
Can we use the exception implicit object in any jsp page?
Explain the various scope values for
What is jsp and its advantages?
Explain handling of runtime exceptions.
How can we retrieve warnings?
What is the
Can a subsequent request be accessed with one’s servlet code, if a request attribute is already sent in his jsp?
How jsp is executed by web server?
What language is used to write servlets and jsp?
write a program in javasacript to shake the window
Can we define a class inside a jsp page?