<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>GETPAGECONTEXT</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">GETPAGECONTEXT</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Gets the current ColdFusion&#160;MX PageContext object that provides access to page attributes and configuration, request, and response objects.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Returns</span>
<p>
The current ColdFusion&#160;MX Java PageContext Java object.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
System functions
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Function syntax</span><pre>GetPageContext() 
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion&#160;MX: Added this function. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
The ColdFusion&#160;MX PageContext class is a wrapper class for the Java PageContext object that can resolve scopes and perform case-insensitive variable lookups.
</p>

<p>
The PageContext object exposes fields and methods that can be useful in J2EE integration. It includes the include and forward methods that provide the equivalent of the corresponding standard JSP tags. You use these methods to call JSP pages and servlets. For example, you use the following code in CFScript to include the JSP page hello.jsp and pass it a name parameter:
</p>
<pre>GetPageContext().include(&quot;hello.jsp?name=Bobby&quot;); ===
</pre>
<p>
When you use GetPageContext to include a JSP page in a CFML page on WebLogic, you may need to flush the output of the CFML page with cfflush before calling the JSP page. Otherwise, the ColdFusion output appears after the JSP output.
</p>

<p>
For more information, see your Java Server Pages (JSP) documentation.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;!--- this example shows using the page context to set a page 
variable and access the language of the current locale ---&gt;
&lt;cfset pc = GetPageContext()&gt;

&lt;cfset pc.setAttribute(&quot;name&quot;,&quot;John Doe&quot;)&gt;
&lt;cfoutput&gt;name: #variables.name#&lt;br&gt;&lt;/cfoutput&gt;

&lt;cfoutput&gt;Language of the current locale is
#pc.getRequest().getLocale().getDisplayLanguage()#&lt;/cfoutput&gt;&gt;. 
</pre>
         </td>
      </tr>
   </table>
   </div>

  </body>
</html>
