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 / 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


Please Help Members By Posting Answers For Below Questions

How can we handle the exceptions in jsp?

1007


Why jsp is better over static html also explain lifecycle of a jsp?

918


Explain client-side and server-side validation.

929


What is the purpose of jsp and why it is widely used?

1058


Why don’t we need to configure jsp standard tags in web.xml?

924


Explain JSP directives.

1059


What are the implicit, internal objects and methods on the jsp page?

941


What is jsp custom tag and what are it’s components?

929


What is out println in jsp?

1028


Which tag should be used to pass information from jsp to include jsp?

958


What is difference between html and jsp?

1051


What is difference between custom jsp tags and beans?

1005


Define scriptlet, expression and declaration in jsp?

985


What is the use of session management?

946


How do I run a jsp file?

994