Chapter 12: Using the Application Framework
203
<!--- Show the form only if it has not been submitted. --->
<CFELSE>
<FORM ACTION="cflock.cfm" METHOD="Post">
<P> Congratulations! You have just selected
the longest wearing, most comfortable turtleneck
in the world. Please indicate the color and size
you want to buy.</P>
<TABLE CELLSPACING="2" CELLPADDING="2" BORDER="0">
<TR>
<TD>Select a color.</TD>
<TD><SELECT TYPE="Text" NAME="color">
<OPTION>red
<OPTION>white
<OPTION>blue
<OPTION>turquoise
<OPTION>black
<OPTION>forest green
</SELECT>
</TD>
</TR>
<TR>
<TD>Select a size.</TD>
<TD><SELECT TYPE="Text" NAME="size">
<OPTION>small
<OPTION>medium
<OPTION>large
<OPTION>xlarge
</SELECT>
</TD>
</TR>
<TR>
<TD></TD>
<TD><INPUT TYPE="Submit" NAME="submit" VALUE="Submit">
</TD>
</TR>
</TABLE>
</FORM>
</CFIF>
</BODY>
</HTML>
Example of synchronizing access to a file system
The following example demonstrates how to use CFLOCK to synchronize access to a
file system. The CFLOCK tag protects a CFFILE tag from attempting to append data to
a file already open for writing by the same tag executing on another request.
Note that if an append operation takes more that one minute, a request waiting to
obtain an exclusive lock to the critical section may time out. Also, note the use of a
Summary of Contents for COLDFUSION 4.5-DEVELOPING WEB
Page 1: ...Allaire Corporation Developing Web Applications with ColdFusion ColdFusion 4 5...
Page 14: ...xiv Developing Web Applications with ColdFusion...
Page 26: ...xxvi Developing Web Applications with ColdFusion...
Page 34: ...8 Developing Web Applications with ColdFusion...
Page 70: ...44 Developing Web Applications with ColdFusion...
Page 84: ...58 Developing Web Applications with ColdFusion...
Page 114: ...88 Developing Web Applications with ColdFusion...
Page 148: ...122 Developing Web Applications with ColdFusion...
Page 174: ...148 Developing Web Applications with ColdFusion...
Page 208: ...182 Developing Web Applications with ColdFusion...
Page 244: ...218 Developing Web Applications with ColdFusion...
Page 274: ...248 Developing Web Applications with ColdFusion...
Page 288: ...262 Developing Web Applications with ColdFusion...
Page 300: ...274 Developing Web Applications with ColdFusion...
Page 350: ...324 Developing Web Applications with ColdFusion...
Page 362: ...336 Developing Web Applications with ColdFusion...