Name
CFSERVLETPARAM — New as of ColdFusion 4.5
Synopsis
<CFSERVLET> [<CFSERVLETPARAM>] ... </CFSERVLET>
Used as a child tag of the CFSERVLET
tag to pass
parameters and attributes to a Java servlet. Multiple
CFSERVLETPARAM
tags may pass multiple
parameters/attributes. Both simple and complex datatypes such as
arrays, queries, and structures can be passed to servlets via
CFSERVLETPARAM
tags.
Data can be passed to a servlet in two ways: by value and by
reference. To pass data by value (as a parameter), use the
NAME
and VALUE
attributes. Data
passed by value is modified only within the servlet. To pass data by
reference (as an attribute), use the NAME
,
VARIABLE
, and optionally the
TYPE
attribute. If the servlet modifies data
passed by reference, the data in the corresponding ColdFusion
variable is also changed.
Attributes
-
NAME="
parameter_name
"
The name of the parameter to pass to the
CFSERVLET
tag whenVALUE
is also specified. IfVARIABLE
is used in lieu ofVALUE
, specifies the name of the Java attribute to associate with the ColdFusion variable specified inVARIABLE
. Required.-
TYPE="Bool|Date|Int|Real|String"
The datatype of the ColdFusion variable being passed to the servlet.Options are
Bool
,Date
,Int
,Real
, andString
. Optional. The default isString
. To see how various ColdFusion datatypes map to Java equivalents, see Table A-1.
Table A-1. ColdFusion Datatypes and Java Equivalents
ColdFusion Datatype |
TYPE Attribute |
Java Equivalent |
---|---|---|
Boolean |
Bool |
java.lang.Bool |
Date |
Get Programming ColdFusion now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.