| Contents > CFML Reference > ColdFusion Functions > GetPageContext |
|
|
|
|
||
Gets the current ColdFusion MX PageContext object that provides access to page attributes and configuration, request and response objects.
The current ColdFusion MX Java PageContext Java object.
GetPageContext()
ColdFusion MX: Added this function.
The ColdFusion MX PageContext class is a wrapper class for the Java PageContext object that can resolve scopes and perform case-insensitive variable lookups.
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:
GetPageContext().include("hello.jsp?name=Bobby"); ===
For more information, see your Java Server Pages (JSP) documentation).
<!--- this example shows using the page context to set a page
variable and access the language of the current locale ---> <cfset pc = GetPageContext()> <cfset pc.setAttribute("name","John Doe")> <cfoutput>name: #variables.name#<br></cfoutput> <cfoutput>Language of the current locale is
#pc.getRequest().getLocale().getDisplayLanguage()#</cfoutput>>.
|
|
||
| Contents > CFML Reference > ColdFusion Functions > GetPageContext |
|
|
ColdFusion 8 | ColdFusion MX 7 | ColdFusion MX 6.1 | ColdFusion MX | Forums | Developer Center | Bug Reporting
Version 6.1
Comments are no longer accepted for ColdFusion MX 6.1. ColdFusion 8 is the current version.
RSS feed | Send me an e-mail when comments are added to this page | Comment Report
Current page: http://livedocs.adobe.com/coldfusion/6.1/htmldocs/funct104.htm
Comments
gabrielzamp said on Jan 8, 2006 at 2:32 PM :