What is context?

hi,
I am new to serlvets .. Can any one tell me what is mean by context and why is it used?
Thanks.

Hy,
welcome in the Servlets World !
The Context is like an Umbrella for a Web Application. Under it,
you place Web Pages, Images, the web.xml File, and, of course,
your Servlets ;-).
Also, it is the Bridge between the Web Application and the Servlet
Container, in then that it provides several Informations about it's
Environment.
A Context itself is divided in two parts :
1. One, that is accessible from a Client. (You can retrieve it via
a Url call)
2. One, that is not acessible from a Client. (May only be accessed
by Web Pages and Servlets)
Each Web Application has to be under a Context. You cannot place a
Servlet twice under the same, but under two different Context's.
They don't know each other, and have it's own scope and space.
A practical Example (using Tomcat) :
All Context's are placed under the /webapps Directory. Let's assume
the default Web Application "/examples" (as you assume, correct
Path is now "/webapps/examples").
Folders in it would be :
// Accessible from the Client
/examples
/examples/html -> your static pages
/examples/jsp -> your dynamic pages
/examples/images -> your global images
/examples/...
// Not accessible by a Client (Protected Resources)
/examples/WEB-INF
/examples/WEB-INF/web.xml -> Web Deployment Descriptor
/examples/WEB-INF/classes -> your Servlets
/examples/WEB-INF/lib -> your custom Jar's
/examples/WEB-INF/...
Hope, that helps you a bit
Best regards
jherunter

Similar Messages

  • What is Context object?

    Hi,
    any one help me out what is context object.
    thaks

    Hi,
    check this links
    http://help.sap.com/saphelp_nw04/helpdata/en/ab/13bf7191e73a4fb3560e767a2525fd/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/6e/ff0bf75772457b863ef5d99bc92404/content.htm
    Property File: A Smart use in XI context.
    Receiver Determination based on the payload of input data.(Extended-->xpath,Context Object)
    Regards,
    Surya

  • What is Context Change

    Hi
    experts plz tell me what is context change

    Hi
    Context : Context of an element is nothing but just the level, where
    the XML tag appears in the given XML
    document. Level of any element is set to the immediate parent node by
    default.
    Context Change : Context change is just changing the level of XML
    tag(element level in XSD) in the XML document.
    This means when we map one source field to one target field then that
    both field segments should be at same
    level.
    Example
    The reason that context changes can occur in mapping is because sometimes you want to manipulate the structure of the message that's being transferred between systems. For example, lets say you have a message being sent from one system as an XML file, and the structure looks similar to the following:
    code
    <header>
    <field1></field1>
    <field2></field2>
    </header>
    [/code]
    However, the system that the message is being sent to has a requirement that each field be split into individual <header> format (I know, this is not a real world example), then you want to use context changes to make the format look something like this instead:
    code
    <header>
    <field1></field1>
    </header>
    <header>
    <field2><field2>
    </header>
    [/code]
    Essentially, you use context mapping when your requirements ask you to change the structure of the XML message, not just strictly apply transformations to each field. You can also check this blog that incorporates user-defined functions for advanced context changes: Mapping Context Changes in XI
    Message Mapping Simplified - Part I
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Hope this info is useful to you..
    Thanks
    Saiyog
    Edited by: Saiyog Gonsalves on Aug 1, 2008 10:00 AM

  • What is Context attribute

    Hi,
    What is context attribute and how it can be used in XI?
    Thanks in Advance,
    Ajay.

    Hi,
    I think it is related to web dynpro:
    http://help.sap.com/saphelp_nw04/helpdata/en/76/98384162316532e10000000a1550b0/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/c7/a4384162316532e10000000a1550b0/frameset.htm
    Regards
    Suraj

  • What is context in message mapping

    Hi All,
    What is context in message mapping?
    Thanks,
    Anil.

    Hi Anil
    Go thru the following blogs by Sravya
    <a href="/people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i Mapping Simplified - Part 1</a>
    <a href="/people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii Mapping Simplified - Part 2</a>
    Regards
    Santhosh

  • What is context standing

    Hey i dont know what it is but the client asked me this question what is context standing ? so i really dont know in which scenario it comes. if anyone has this answer so plz let me know.

    Hi ,
    Check these blogs...
    /people/sravya.talanki2/blog/2005/08/16/message-mapping-simplified--part-i
    /people/sravya.talanki2/blog/2005/12/08/message-mapping-simplified-150-part-ii
    Sekhar

  • What are context properties to use with sun imq ?

    Hi
    Thank you for reading my post.
    what are Context properties that we should use to connect an application to sun IMQ ?
    I mean :
    INITIAL_CONTEXT_FACTORY
    PROVIDER_URL
    Thanks

    You can purchase music using multiple accounts within the same Windows profile & using the same iTunes library. I think when you log into the store it remembers the last account name used, but provided you don't let it remember your password then you have the opportunity to enter the correct details for each purchase.
    If you're going to place these purchases on your respective iPod's the following may help.
    *How to use multiple iPods with one computer*
    The Apple support document How to use multiple iPods with one computer suggests a number of ways. I use method two (Sync with selected playlists) with a slight twist. Rather than regular playlists I set the grouping field to indicate which users should receive which tracks and create smart playlists based on the content of this field.
    e.g.
    "Alice's Tracks" is "Grouping contains Alice" + "Kind contains audio"
    "Bob's Videos" is "Grouping contains Bob" + "Kind does not contain audio"
    Tracks that both Alice & Bob want on their iPods have the grouping set to "Alice/Bob"
    etc.
    I currently manage our family's five iPods using this system, each getting a different selection to suit their tastes and the capacity of their iPod. An advantage of using the grouping field is that it is stored in file tags (for non-wav audio files anyway) so that it is relatively easy to recreate the playlists should the iTunes library get trashed. Also useful if you move files about manually as playlist membership is preserved when you delete & re-import the tracks.
    tt2

  • What is context objects and how we can use it Receiver Determination

    hi,
    i have situation here a idoc is triggered into the xi and i need to use the conditions in the receiverdetermination in that condition i need to use  context object how i can use it? and what is the difference it makes and why i need to use it?
    thanks in advance
    Amaresh

    HI,
    Context objects are alternative to XPATH expressions. It is like macros in other programming langugage. If you define this , you can use this object in the receiver determination while doing conditional receiver determination
    For more-
    http://help.sap.com/saphelp_nw2004s/helpdata/en/d6/e44fcf98baa24a9686a7643a33f26f/content.htm
    /people/prasadbabu.nemalikanti3/blog/2006/09/20/receiver-determination-based-on-the-payload-of-input-dataextended-xpathcontext-object
    Regards,
    Moorthy

  • What is "Context.INITIAL_CONTEXT_FACTORY" for SunOne 7?

    Hi
    This is the env I used for IBM WebSphere 5. What is the equivalent for SunOne 7?
    Jirong
    protected Context getInitialContext() throws javax.naming.NamingException {
              Properties p = new Properties();          
              p.put(Context.INITIAL_CONTEXT_FACTORY, "com.ibm.ejs.ns.jndi.CNInitialContextFactory");
    p.put(Context.PROVIDER_URL, "iiop://localhost:900/");
              return new InitialContext(p);
         }

    Hai,
    When i m conencting to database im getting a problem if any one can suggest help me
    Hashtable parms = new Hashtable();
    parms.put(
                        Context.INITIAL_CONTEXT_FACTORY,
                        "com.ibm.websphere.naming.WsnInitialContextFactory");
    Context ctx = new InitialContext(parms);
    DataSource ds1 = (DataSource) ctx.lookup("jdbc/ds1");
    its showing these exception
    javax.naming.ConfigurationException: Malformed provider URL: corbaloc:iiop:localhost
         at com.ibm.ws.naming.util.WsnInitCtxFactory.parseBootstrapURL(WsnInitCtxFactory.java:1422)
         at com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:368)
         at com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:102)
         at com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:408)
         at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:131)
         at javax.naming.InitialContext.lookup(InitialContext.java:359)
         at com.telstra.mnp.foh.database.MNPFoHDataSource.main(MNPFoHDataSource.java:68)
    Thanks in advance
    Regards
    Inderjeet

  • What does context  means ?(servlet)

    ServletContext context = getServletContext();    i want to know what is the meaning of context . ?
    i come across this word frequently...... what it means ? any example ?
    Thank you

    ServletContext context = getServletContext();i want to know what is the meaning of context
    i come across this word frequently...... what it
    means ? any example ?
    Thank youA servlet is an example of a plugin, a class which is pulled in and run by a larger system.
    Context information relates to the context in which the plugin is run. In the case of a servlet it's information concerning the web application of which the servlet is a part.

  • What is Context and queue?

    Q.1What is context and queue in graphical mapping?
    Q.2What is the difference between context and queue in graphical mapping and how these concepts are useful in mapping?

    Hi,
    Context Change
    Message mapping works internally by using queues
    If no further elements are imported at a particular hierarchy level, a Context Change is inserted in the queue
    Use node functions to handle changes in the message hierarchy.
    Context changes have impact on:
    User-Defined Functions
    Breaking and inserting of hierarchy levels Manipulation of queues ant contexts
    Explicit context selection on source elements and nodes
    Using node functions
    removeContexts: deletes all context changes of a queue
    SplitByValue: insert additional context changes in a queue
    Check this link for all details.
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    A tool to display queues:
    -Upload or create source xmldocument in test mode
    - Right-click on box representing element or function
    - Select “Show queue”
    Also check out this link
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/be05e290-0201-0010-e997-b6e55f9548dd
    Hope this will help you.
    Regards
    Aashish Sinha
    PS : reward points if helpful

  • What is the concept of Context ?  InitialContext, SessionContext ???

    hi,
    What does context mean? conceptually I have see lots of code use SessionContext, EntityContext in EJB codes and InitialContext in Servlet codes. As far as I understand, they are used to get environment variables. But how are they really working, I mean "When/How should I create one?" . An analogy would be very much appreciated or great any references/links would be good.
    THANK YOU

    My understanding of context (in general) is that it represents an environment, or state within which something exists. The context object allows the enclosed object to communicate with its environment.
    For example, when you run an Applet, it has a method to retrieve the AppletContext. This context allows the applet to communicate with the browser within which it is embedded.

  • What exactly is a context?

    There is something that is kind of messing me up... I do not exactly understand what a "context" is... I am starting to read J2EE material, and there are all kinds of context objects, usually associated with some other kind of object.
    What exactly is the context object in relation to the other object?
    Thanks,
    PM

    Have a look at the API.
    Example:
    public interface SessionContext
    extends EJBContext
    The SessionContext interface provides access to the runtime session context that the container provides for a session enterprise Bean instance. The container passes the SessionContext interface to an instance after the instance has been created. The session context remains associated with the instance for the lifetime of the instance.
    Or...
    public interface ServletContext
    Defines a set of methods that a servlet uses to communicate with its servlet container, for example, to get the MIME type of a file, dispatch requests, or write to a log file.
    There is one context per "web application" per Java Virtual Machine. (A "web application" is a collection of servlets and content installed under a specific subset of the server's URL namespace such as /catalog and possibly installed via a .war file.)

  • Static Context: What Does it REALLY mean?

    Friends,
    I really having this trouble of grabbing the idea of static context vs non-static context.
    Lets say I have a static method, is that mean that all items (variables and calls) inside it are assumed to be static as well?
    Thanks in advance.

    Any statement or expression inside the static method is said to "occur in a static context". In such a method - like the traditional main() method - only static members and methods can be used.
    (Statements and expressions occuring in lots of other places are also said to occur in a static context - see the JLS http://java.sun.com/docs/books/jls/third_edition/html/classes.html#296300 for details. In a loose sense what these contexts have in common is that they "belong" to the class as a whole, rather than to any specific instance: they relate to class wide things and operations.)

  • Context - What is it?

    I have a very basic question. What is context.
    Can any one explain in a very simple way.
    Assume you are explaining a non technical guy.

    Are you talking about java classes/interfaces called "Context"? Context is typically just a wrapper for defining the attributes of some container, like a servlet engine or EJB container. I don't think sun's done a very good job making all the different Context types use the same API (JNDI, servlets, ejbs- they all have separate Contexts), but they're all pretty similiar in focus. Basically, it provides a handle for resources to gain information about the container that they are running within, like, say, finding the base directory or maybe security information.

Maybe you are looking for

  • Can we store procedure in a folder in text file using SQL QUERY

    I want to create a folder in D drive and give folder name as current date. After that create no. of text files based on how many procedure are,  text file name will be same as procedures name and insert a procedures inside the text files by using sto

  • Attribue UOM in Org model

    Hi My business requirement is that: ' EA' UOM to be defaulted in to the shopping cart. I have throught of UOM as an attribute, and I see that there is no standard SAP supplied a_ttribute. I think of following options: 1. Create a cutomer attribute fo

  • MTU and the UK and BT

    Now here is a poser. We all know that the recommended MTU for ADSL here in the UK is 1458 as recommended by BT. Now what I need to know is that an Macs the settings shown in System Prefs is set at 1500. So what I have discovered from Draytek who happ

  • OIM 11.1.1.5 software for Windows 64 bit

    Hi, I have installed weblogic server 10.3.5 and SOA 11.1.1.5 on my windows 64 bit machine. I am having hard time to find the software for OIM 11.1.1.5. Can you please let me know the url where I can download it? I found 11.1.1.2 and patch 11.1.1.5. D

  • Supress Field and space

    Hi Supress field is occuping space in crosstab report. how to remove the space? Thank you