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.

Answers were Sorted based on User's Feedback



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

Answer / asra

<%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 ?    5 Yes 6 No

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

Answer / vipin

<session.getAttribute(name);>

Is This Answer Correct ?    4 Yes 7 No

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

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

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

Answer / vilu

HttpSession session = request.getSession(true);

Is This Answer Correct ?    4 Yes 13 No

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

Answer / prasanthi

small correction in answer 1:
session.setAttribute("user",name);
using retrive method
//String sessionuser=session.getAttribute(name);
String sessionuser=(String)session.getAttribute(name);

Is This Answer Correct ?    6 Yes 16 No

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

Answer / vali

hi this is naru

Is This Answer Correct ?    32 Yes 75 No

Post New Answer

More JSP Interview Questions

How can I override the jspinit() and jspdestroy() methods within a jsp page?

0 Answers  


What is the difference in using request.getrequestdispatcher() and context.getrequestdispatcher()?

0 Answers   Cap Gemini,


How can I use jsp in the mvc model?

0 Answers  


What is the <jsp:usebean> standard action?

0 Answers  


How do we print “<br> creates a new line in html” in jsp?

0 Answers  


What is the purpose of <jsp:setproperty >?

0 Answers  


What is declaration statement?

0 Answers  


What is a expression?

0 Answers  


Mention the scope values for <jsp.usebean> tag.

0 Answers  


How to works asjx in jsp?

1 Answers  


How run jsp program in netbeans?

0 Answers  


How to implement a thread-safe jsp page?

3 Answers  


Categories