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 Session and cookies?Explain in detail with an 
example?
 Question Submitted By :: Sundar
I also faced this Question!!     Rank Answer Posted By  
 
  Re: What is Session and cookies?Explain in detail with an example?
Answer
# 1
session will keep track of user interaction of a single client

cookies are the ones which are the small server side
entities to store the client side data inside it.
 
Is This Answer Correct ?    2 Yes 0 No
Ravikiran
 
  Re: What is Session and cookies?Explain in detail with an example?
Answer
# 2
we r all familiar with the method given below

HttpSession session==request.getSession(true);
what happen here

Container whenever gets a request for a session from a client,
it checks out whether the request is for existing or a new
one,how it does.


If a new session: creates a cookie(small text file) ,stuffs
the session id ,and send it to the client as apart of
response headers (Set Cookie:)

existing one---gets the sessionid ,searches for the matching
session and associate with the  request.

Now thing if ur browser is cookies disable, what will happen
next?? :)
 
Is This Answer Correct ?    0 Yes 0 No
Debapriya Maity
 
 
 

 
 
 
Other Core Java Interview Questions
 
  Question Asked @ Answers
 
What is difference between abstract class & final class  5
What is the use join() in Threads ? HCL4
why the equals method can be override?when we override the equals method?  4
how can we synchronize Hash map? CTS3
What is the use of an interface?  3
What is Interface? BMC5
Why we use static and synchronized in method for single thread model example: public static synchronized add(){}  1
what is difference between String buffer and String builder? Benchmark2
What is garbage collection in Java, and how can it be used ? Wipro10
how to call a method in different package?  4
What is meant by packages?  2
how to handle http request in struts Polaris2
What is meant by throwing an Exception? Accenture4
what is difference between servletconfig and servletcontext? AMDOC3
Does a class inherit the constructor of its super class?if it does, how can you hide that constructor? if it doesnot how can you call it from the sub class?  1
Explain cookies?  2
Difference between Array and vector?  4
what is the difference b/w PUT and POST method to send data to the server Mind-Tree2
What is the relationship between a method?s throws clause and the exceptions that can be thrown during the method?s execution?  2
is this possible to create an array of 0 length? if so how? if not so why? coz we have an array in main() likw this "static void main(String [] s) then what it signifies? Hexaware2
 
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