User Guide

Chapter 1: ColdFusion Tags 193
Usage The syntax of the CFSERVLET tag is designed to be consistent with the HTML markup
<SERVLET> and <PARAM> used by some web servers to invoke Java servlets from
.shtml pages in what is known as SSI, Server-Side Includes.
Note The servlet must exist somewhere in the class path of the JRun engine
executing the servlet. The JRun "servlet" subdirectory is a good location
since it is already in JRuns class path and because classes in this directory
are automatically reloaded by JRun if they change.
Example <CFSERVLET CODE=”MyServletName”
JRUNPROXY=”236.3.3.4:8083”
TIMEOUT=”300”
WRITEOUTPUT=”YES”>
<CFSERVLETPARAM NAME=”Param1” VALUE=”Value1”>
<CFSERVLETPARAM NAME=”Param2” VALUE=”Value2”>
<CFSERVLETPARAM NAME=”Attribute1” VARIABLE=”CFVar1”>
<CFSERVLETPARAM NAME=”Attribute2” VARIABLE=”CFVar2”>
</CFSERVLET>
CFSERVLET Variables
Variable Name Description
CFSERVLET.Output Inline text output of the servlet is directed to
this structure if the WRITEOUTPUT attribute is
set to No.
CFSERVLET.servletResponseHeaderName The CFSERVLET return structure also contains
the values of any response headers returned by
the servlet. To access a response header,
specify its name in
servletResponseHeaderName.