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

Answer Posted / faizan samad

String name="faizan";
session.setAttribute("user",name);


String sessionuser=session.getAttribute(name);
out.println("welcome"+sessionuser);
it will display as "Welcome Faizan".

Is This Answer Correct ?    17 Yes 22 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is use of scriptlet tags in jsp?

485


What is called jsp directive?

523


What is the standard action?

545


What is welcome file list?

485


What is jsp and its uses?

526






Explain client and server side validation?

512


What is the standard action?

526


What is jsp servlet?

500


How to call java method in jsp page on button click?

1011


What is difference between sendredirect and requestdispatcher?

497


What is the jsp:setproperty action?

551


Why jsp and servlets are used?

517


Why is used in jsp?

499


Why do we need servlets and jsp?

491


Which implicit object is not available in normal jsp pages?

482