• 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

Contexts

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between a Context, IntialContext,SessionContext and a ServletContext? Can anyone plz give me a clear understanding abt these?
 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What is the difference between a Context, IntialContext,SessionContext and a ServletContext? Can anyone plz give me a clear understanding abt these?
Why you need an explain of the differences between these terms?? They are four absolutely different concepts:
1) Context and InitialContext come from java.naming package and are used in JNDI to locate a context in a naming and/or directory server; Specifically context is an interface ("This interface represents a naming context, which consists of a set of name-to-object bindings. It contains methods for examining and updating these bindings" - Javadoc); InitialContext is a concrete implementor class of Context interface and provides "the starting point for performing naming operations".
2)SessionContext is an interface of the EJB world. Javadoc says :"The SessionContext interface provides access to the runtime session context that the container provides for a session enterprise Bean instance";
3) ServletContext is the same as SessionContext, but it refers to Servlet World. It contains informations about the context where your servlets are running.
Hope it helps
 
PSV Kumar
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx Andrea... it really helped me
 
Message for you sir! I think it is a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic