Dumping HTTP Servlet Request Attributes and Parameters in CF
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 atrib = httpReq.getAttributeNames()> <cfloop condition="#atrib.hasMoreElements()#"> <cfset name = atrib.nextElement()> <strong><cfoutput>#name#</cfoutput></strong> = <cfdump var="#httpReq.getAttribute(name)#"> <hr /> </cfloop>
Like this? Follow me ↯Tweet Follow @pfreitag
Dumping HTTP Servlet Request Attributes and Parameters in CF was first published on April 27, 2020.
If you like reading about cfml, servlet, or coldfusion then you might also like:
- URL Safe Base64 Encoding / Decoding in CFML
- Using Hashicorp Vault with ColdFusion
- CFML Left and Right Functions can Accept Negative Counts
- 6 ways to stay connected with other CF developers
- ColdFusion Function Arguments now support Integer
- Fixinator and Foundeo Security Bundle
- CFSummit 2016 Slides
- Disable Flash Remoting on ColdFusion Servers
The FuseGuard Web Application Firewall for ColdFusion & CFML is a high performance, customizable engine that blocks various attacks against your ColdFusion applications.