Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What are custom tags?

833


Explain client-side and server-side validation.

874


What are page directives?

943


Explain the difference between forward and sendredirect?

908


Can we use the exception implicit object in any jsp page?

884


Explain the various scope values for tag.

901


What is jsp and its advantages?

962


Explain handling of runtime exceptions.

1186


How can we retrieve warnings?

954


What is the standard action?

956


Can a subsequent request be accessed with one’s servlet code, if a request attribute is already sent in his jsp?

960


How jsp is executed by web server?

1020


What language is used to write servlets and jsp?

863


write a program in javasacript to shake the window

2900


Can we define a class inside a jsp page?

926