PageContent.getRequest Variables.

All of the methods below can be exracted using getPageContext().getRequest().theMethod(), i.e. getPageContext().getRequest().getRequestURL()

See https://www.gregoryalexander.com/blog/2025/9/2/a-modern-way-to-get-the-page-url-with-coldfusion-and-lucee-using-the-pagecontext-java-object- for more information.

URL Related Variables

getRequestURL(): https://gregoryalexander.com/blog/demo/pageContent/getRequest/index.cfm
getQueryString: (This may or may not be defined. I have occasional errors when there are no arguments in the URL)
getServerPort(): 443
getMethod(): GET
getLocalPort(): 443
getProtocol(): HTTP/1.1
getScheme(): https

Server Variables

getServerName() gregoryalexander.com (Note: this is actually the domain name!)
getServerPort(): 443
getLocalAddr(): 192.168.5.4
getLocalName(): gregoryalexander.com

Path Variables

getContextPath:
getRequestURI: /blog/demo/pageContent/getRequest/index.cfm
getPathInfo:
Note: anchors are not available. Get them using JavaScript and the client browser.