Context file contains all the global configuration settings for E- Business Suite.
The Context file is in the XML format.The name of the Context file will be $CONTEXT_NAME.xml.
The Context variable is set as the $ORACLE_SID or $ORACLE_SID_[hostname].

Example :
If the  $ORACLE_SID is DEV and the host name is dev0123 then the context file name will be DEV_dev0123.xml

Context file for RDBMS/Oracle

In 11i
cd $ORACLE_HOME/appsutil

In R12
cd $ORACLE_HOME/appsutil

Context File for APPLICATION

In 11i
cd $APPL_TOP/admin

In R12
cd $INST_TOP/appl/admin


If the context file is not present then it can be generated manually. But the environment for which the context file needs to be created should be properly set.(either database or application).

Context file creation for RDBMS/Oracle
Go to:
cd $ORACLE_HOME/appsutil /bin 

perl adbldxml.pl


Context file for APPLICATION
Go to:
cd $AD_TOP/bin

perl  adbldxml.pl


Explaination of ADBLDXML.PL

Syntax:
adbldxml.pl <tier=<tiertype>> [appsuser=<appsusername>] [appspass=<appspassword>]        [template=<contexttemplatepath>] [log=<logfilepath>] [out=<contextfilepath>] [servername=<hostname>] [jtop=<jre/jdk location>]

Parameters

<tiertype>                         : { apps(default) | db }, tier for which context file is to be generated.
<appsusername>            : Apps user name, defaults to "apps".
<appspassword>            : Apps password, prompts if not passed.
<contexttemplatepath>   : Complete path to context template. If not specified, default template 
                                            will be
                                            For apps tier : $AD_TOP>/admin/template/adxmlctx.tmp
                                            For db tier   : $ORACLE_HOME>/appsutil/template/adxdbctx.tmp
<logfilepath>                    : Complete path of log file. If not specified, the file will be automatically 
                                            created in
                                            For apps tier : $APPL_TOP>/admin/<s_contextname>/log
                                            For db tier   : $ORACLE_HOME>/appsutil/log/<s_contextname>
<contextfilepath>             : Complete path of output context file. If not specified, the file will be
                                            For apps tier : $APPL_TOP>/admin/<s_contextname>.xml
                                            For db tier   : $ORACLE_HOME>/appsutil/<s_contextname>.xml
<hostname>                     : Server for which applications context File is to be generated.
<jtop>                                : Complete path to JRE_TOP or JDK_TOP, depending on the the 
                                             RDBMS  version(db tier only)