O'Reilly logo

Programming ColdFusion MX, 2nd Edition by Rob Brooks-Bilson

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required