ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   SiteMap shows list of All Categories in this site.
Google
 
Categories  >>  Software  >>  Core Java  >>  Java J2EE  >>  Java Related
 
 


 

 
 Core Java interview questions  Core Java Interview Questions
 Advanced Java interview questions  Advanced Java Interview Questions
 Swing interview questions  Swing Interview Questions
 EJB interview questions  EJB Interview Questions
 Servlets interview questions  Servlets Interview Questions
 Struts interview questions  Struts Interview Questions
 JDBC interview questions  JDBC Interview Questions
 JMS interview questions  JMS Interview Questions
 SunOne interview questions  SunOne Interview Questions
 J2EE interview questions  J2EE Interview Questions
 Weblogic interview questions  Weblogic Interview Questions
 Websphere interview questions  Websphere Interview Questions
 Java Networking interview questions  Java Networking Interview Questions
 Java J2EE AllOther interview questions  Java J2EE AllOther Interview Questions
Question
what is use of session tracking ?with example?
 Question Submitted By :: Gopalraop
I also faced this Question!!     Rank Answer Posted By  
 
  Re: what is use of session tracking ?with example?
Answer
# 1
Session Tracking is one of the most powerful features of 
Servlets and JSP. Basically, the servlet engine takes care 
of using Cookies in the right way to preserve state across 
successive requests by the same user. Your servlet just 
needs to call a single method (getSession) and it has 
access to a persistent hashtable of data that's unique to 
the current user

public void doPost(HttpServletRequest request, 
HttpServletResponse response){
...
//lets take the session obj
HttpSession session = request.getSession(true);
//now let us take the user name assosiated with this session
String currUserLogin = (String) session.getAttribute
("currentUserLogin")
...
//now we do the work according to the user name
doSomeWork(currUserLogin);
...

}
 
Is This Answer Correct ?    0 Yes 0 No
Sivasubramanian.k
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
How to add panel to a Frame?  2
Explain Event handling in AWT?  1
What is System class and its purpose?  2
what is the Diff. between Access Specifiers and Access Modifiers? Wipro10
What is the difference between this() and super()? TCS5
How many bits are allocated to represent character of character sets - Unicode, ASCII, UTF-16, UTF-8?  1
Can you call a private data from an inner class?  3
Difference between the paint() and repaint() methods?  1
what are the jsp tags with example? Photon1
what is synchronization  2
Different types of Layouts?  3
public class Garbage { int a=0; public void add() { int c=10+20; System.out.println(c); System.out.println(a); } public static void main(String args[]) { Garbage obj=new Garbage(); System.gc(); System.out.println("Garbage Collected"); obj.add(); } } Above is a code in java used for garbage collection. object obj has been created for the class Garbage and system.gc method is called. Then using that object add method is called.System.gc method if called the obj should be garbage collected?  6
finalize() method?  3
Which class is extended by all other classes?  2
1).what is the difference between below examples String s="vijay"; String s=new String("vijay"); TCS11
In what types of operations an ArithmeticException will be thrown?  2
what is Portal(web based online portal)? AIG1
why the wait,notify,notifyall methods are placed in object class?these are the thread concepts why these methods are placed in Object class?  2
How u dubugg ur project? iFlex1
What is a class ?  8
 
For more Core Java Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com