• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Servlet Config

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 8945
Firefox Browser Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 232
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
check this buddy.

https://coderanch.com/t/360026/Servlets/java/ServletConfig-Context
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic