Saturday, 30 March 2013

What is session tracking and how do you track a user session in servlets?


What is session tracking and how do you track a user session in servlets?  
Session tracking is a mechanism that servlets use to maintain state about a series requests from the same user across some period of time. The methods used for session tracking are: a) User Authentication occurs when a web server restricts access to some of its resources to only those clients that log in using a recognized username and password. b) Hidden form fields fields are added to an HTML form that are not displayed in the client’s browser. When the form containing the fields is submitted, the fields are sent back to the server. c) URL rewriting every URL that the user clicks on is dynamically modified or rewritten to include extra information. The extra information can be in the form of extra path information, added parameters or some custom, server-specific URL change. d) Cookies a bit of information that is sent by a web server to a browser and which can later be read back from that browser. e) HttpSession- places a limit on the number of sessions that can exist in memory. This limit is set in the session. maxresidents property.


Blog Author: Vijay Kumar


Wednesday, 27 March 2013

How many ways can we track client and what are they?


How many ways can we track client and what are they? 
 The servlet API provides two ways to track client state and they are: a) Using Session tracking and b) Using Cookies.



Blog Author: Vijay Kumar

What are the different servers available for developing and deploying Servlets?


What are the different servers available for developing and deploying Servlets?  
a) Java Web Server 
b) JRun 
g) Apache Server 
h) Netscape Information Server
 i) Web Logic

Blog Author: Vijay Kumar


Who is loading the init() method of servlet?


Who is loading the init() method of servlet?  

Web server

Blog Author: Vijay Kumar


What is the life cycle of a servlet?


What is the life cycle of a servlet?  
Each Servlet has the same life cycle: 
a) A server loads and initializes the servlet by init () method. 
b) The servlet handles zero or more client’s requests through service() method. 
c) The server removes the servlet through destroy() method.

Blog Author: Vijay Kumar