• Post Reply Bookmark Topic Watch Topic
  • New Topic

Servlet Config  RSS feed

 
JoiceDony Joseph
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi friends,

As , i want to some basic functionalities and differences for

SERVLET CONFIG
SERVLET CONTEXT
SERVLET SESSION,

Explain briefly when we are used?
Why we are used?

Thanks in Advance
Joice.V
 
Pradeep bhatt
Ranch Hand
Posts: 8933
Firefox Browser Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ServletConfig is an interface that provides configuration info to the Servlet class. The config info will be defined for a servlet in the web.xml file. When the servlet is initialized the web container will create an instance of the ServletConfig and pass the reference to the init method of servlet.

ServletContext - Defines a set of methods that a servlet uses to communicate with its servlet container. There will one instance of ServletContext/webapp/JVM. The i/f has methods for logging, storing data which will be shared among servlets.

HttpSession - Class to store info which is available across client requests. A session represents a series of requests from the same client. Info could be stored until the client logs out or when the time out occurs.
 
Sripathi Krishnamurthy
Ranch Hand
Posts: 232
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!