Name

cfservletparam

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.

This tag has been deprecated in ColdFusion MX. See cfservlet for more information.

Attributes

name=" parameter_name "

The name of the parameter to pass to the cfservlet tag when value is also specified. If variable is used in lieu of value, specifies the name of the Java attribute to associate with the ColdFusion variable specified in variable. Required.

type="Bool|Date|Int|Real|String"

The datatype of the ColdFusion variable being passed to the servlet. Options are Bool, Date, Int, Real, and String. Optional. The default is String. 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 ...

Get Programming ColdFusion MX, 2nd Edition 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.