Here's a little code snippet I wrote many years ago to dump out all the http servlet request attributes or parameters from ColdFusion / Lucee (CFML):
<cfset pageContext = getPageContext()> <cfset httpReq = pageContext.getRequest()> <h3>HttpRequest Parameters</h3> <cfdump var="#httpReq.getParameterMap()#"> <h3>HttpRequest Attributes</h3> <cfset attributeNames = httpReq.getAttributeNames()> <cfloop condition="#attributeNames.hasMoreElements()#"> <cfset name = attributeNames.nextElement()> <strong><cfoutput>#name#</cfoutput></strong> = <cfdump var="#httpReq.getAttribute(name)#"> <hr /> </cfloop>
Comments
Thanks as always, Pete. We should mention also for folks the available gethttprequestdata() CFML function and its headers array (gethttprequestdata().headers). Also, FR can show headers for any request in the request details page and its "headers" tab. All these can help folks with dealing with issues from the recent ghostcat-related tomcat changes, when people may find that CF requests fail, for need of perhaps modifying the ajp connector's allowedrequestattributespattern attribute.