Ben made a serious mistake, however. In the part about variable declaration, he says:
Let's start with something simple -- variable assignment.
The following ColdFusion code creates a variable and assigns
a value to it:
<CFSET name="Ben">
This is the equivalent JSP code:
<%! String name="Ben"; %>
But it's really not. The CF version creates a variable visible only to the thread
that executes it. The JSP version that Ben shows creates a variable visible to all
threads that process the page.
The correct alternative is to declare the variable in a scriptlet, which prevents the
variable from being shared by multiple threads. See the O'Reilly JSP book, page 402
for more info.
chris
---------------
At 10:33 AM -0500 1/18/01, Russ Johnson wrote:
>Check out the November 2000 issue of CFDJ
>(online at www.sys-con.com/coldfusion). It is Volume 2 Issue 11. Ben Forta
>(the MAN) has done an article on JSP and CF. He does a good camparison of
>CF techniques to JSP techniques. He shows syntax for loops and if, elseif
>statements and the like.
>
>Just a starting piont.
>
>Russ
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at
http://www.fusionauthority.com/bkinfo.cfm
Archives: http://www.mail-archive.com/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists