• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 29. Extending ColdFusion with Ja... > Accessing the Underlying Servlet Con...

Accessing the Underlying Servlet Context

With ColdFusion MX 7, each of your CFML pages is being converted to a Java servlet on-the-fly. It's natural that you should be able to access the various objects and methods exposed by the Java Servlet API defined by Sun. In other words, if you feel like using the same methods and interfaces that Java developers use when writing servlets by hand, you are free to do so.

ColdFusion MX 7 uses the GetPageContext() function that gives you access to the underlying page context, which is a servlet term that refers to the current page request. The GetPageContext() function doesn't take any parameters; it just returns the current page context object. The returned object will be a descendant of the abstract javax.servlet.jsp.PageContext class, which just means that the object will have all the methods exposed by PageContext, plus any additional methods supplied by the J2EE server that is actually running ColdFusion.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint