File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes what actually context is in Simpler terms? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "what actually context is in Simpler terms?" Watch "what actually context is in Simpler terms?" New topic
Author

what actually context is in Simpler terms?

Azrael Noor
Ranch Hand

Joined: Jul 29, 2010
Posts: 378
i am finding various definitions of context
but what will i say it in simpler terms.

While programming
we say ""It is not getting context""
or ""how will it get context if we will follow this mechanism""

* is context, an object ? if yes then what type of object it is?
* context is name to object bindings? what is ""NAME""(variable name of object?)
* what actually context contains? as i have seen Path in context variable.

kindly clear me the concept, in simple terms, instead of redirecting me somewherfe

Thank You

Regards
Azrael Noor
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60046
    
  65

Context means the environment in which the code is operating. And yes, it can mean many things depending upon the context within which the word "context" is being used. (See what I did there?)

It could mean many things, including:
  • a web application
  • A construct passed to a method to establish its context, such as ServletContext
  • Implicit constructs in which context information can be stored, such as a JSP's page, request, session and applications contexts for scoped variables.
  • An so on and on and on ...


  • A dictionary definition for context that states this in a general way is:
    The circumstances that form the setting for an event, statement, or idea, and in terms of which it can be fully understood and assessed


    [Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
    Azrael Noor
    Ranch Hand

    Joined: Jul 29, 2010
    Posts: 378
    Thank you

    but what does this means?

    A naming service associates names with objects. An association between a name and an object is called a binding, and a set of such bindings is called a context.

    Paul Clapham
    Bartender

    Joined: Oct 14, 2005
    Posts: 18115
        
        8

    It's hard to explain what it means, beyond saying "It means exactly what it says". Is there something particular you don't understand about it? The only undefined terms in it are "name" and "object"... do you have a question about what they might mean? Beyond that, the sentence just goes on to define other things in terms of "name" and "object". It uses words like "association" and "set" to do that ... do you have a question about what they mean?
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 60046
        
      65

    It means that for that particular use case the context is a set of bindings.
    Azrael Noor
    Ranch Hand

    Joined: Jul 29, 2010
    Posts: 378
    @Paul :
    you made me cry
    why you are getting rude?

    @Bear:

    :: Set of Bindings :: Name and Object Binding <------ So name here is object name?

    Paul Clapham
    Bartender

    Joined: Oct 14, 2005
    Posts: 18115
        
        8

    Azrael Noor wrote:@Paul :
    you made me cry
    why you are getting rude?


    That was the farthest thing from my mind. The way to read that statement (or any other definition) is to break it down into its component parts, rather than just saying "I don't understand". And that was what I tried to do for you.
    Azrael Noor
    Ranch Hand

    Joined: Jul 29, 2010
    Posts: 378
    OK Sir
    Thank You


    @Bear :

    :: Set of Bindings :: Name and Object Binding <------ So name here is object name?
    Bear Bibeault
    Author and ninkuma
    Marshal

    Joined: Jan 10, 2002
    Posts: 60046
        
      65

    I have no idea. I have no context for that question. (See, I used "context" in a sentence again.)
    Azrael Noor
    Ranch Hand

    Joined: Jul 29, 2010
    Posts: 378


    thank you for your replies

     
    Don't get me started about those stupid light bulbs.
     
    subject: what actually context is in Simpler terms?
     
    Similar Threads
    Document Root vs Context Root
    Question on "assigning Object to Context interface"
    Question
    object Vs instance
    Questions of Max's example , plus registry.rebind().