
Configuring and using session variables
327
ColdFusion and J2EE session management
The ColdFusion server can use either of the following types of session management:
•
ColdFusion session management
•
J2EE servlet session management
ColdFusion session management uses the same client identification method as ColdFusion client
management.
J2EE session management provides the following advantages over ColdFusion session
management:
•
J2EE session management uses a session-specific session identifier,
jsessionid
, which is
created afresh at the start of each session.
•
You can share session variables between ColdFusion pages and JSP pages or Java servlets that
you call from the ColdFusion pages.
•
The session automatically ends when the user closes all browser windows.
•
The Session scope is serializable (convertible into a sequence of bytes that can later be fully
restored into the original object). With ColdFusion session management, the Session scope is
not serializable. Only seriablizable scopes can be shared across servers.
Therefore, consider using J2EE session management in any of the following cases:
•
You want to maximize session security, particularly if you also use client variables
•
You want to share session variables between ColdFusion pages and JSP pages or servlets in a
single application.
•
You want to be able to manually terminate a session while maintaining the client identification
cookie for use by the Client scope.
•
You want to support clustered sessions; for example, to support session failover among servers.
Configuring and enabling session variables
To use session variables, you must enable them in both of the following places:
•
ColdFusion MX Administrator
•
The active
cfapplication
tag
ColdFusion MX Administrator and the
cfapplication
tag also provide facilities for configuring
session variable behavior, including the variable time-out.
Selecting and enabling session variables in ColdFusion MX Administrator
To use session variables, they must be enabled on the ColdFusion MX Administrator Memory
Variables page. (They are enabled by default.) You can also use the Administrator Memory
Variables page to do the following:
•
Select to use ColdFusion session management (the default) or J2EE session management.
•
Change the default session time-out. The
cfapplication
tag can override this value. The
default value for this time-out is 20 minutes.
•
Specify a maximum session time-out. The
cfapplication
tag cannot set a time-out greater
than this value. The default value for this time-out is two days.
Содержание COLDFUSION MX 61-DEVELOPING COLDFUSION MX
Страница 1: ...Developing ColdFusion MX Applications...
Страница 22: ...22 Contents...
Страница 38: ......
Страница 52: ...52 Chapter 2 Elements of CFML...
Страница 162: ......
Страница 218: ...218 Chapter 10 Writing and Calling User Defined Functions...
Страница 250: ...250 Chapter 11 Building and Using ColdFusion Components...
Страница 264: ...264 Chapter 12 Building Custom CFXAPI Tags...
Страница 266: ......
Страница 314: ...314 Chapter 14 Handling Errors...
Страница 344: ...344 Chapter 15 Using Persistent Data and Locking...
Страница 349: ...About user security 349...
Страница 357: ...Security scenarios 357...
Страница 370: ...370 Chapter 16 Securing Applications...
Страница 388: ...388 Chapter 17 Developing Globalized Applications...
Страница 408: ...408 Chapter 18 Debugging and Troubleshooting Applications...
Страница 410: ......
Страница 426: ...426 Chapter 19 Introduction to Databases and SQL...
Страница 476: ...476 Chapter 22 Using Query of Queries...
Страница 534: ...534 Chapter 24 Building a Search Interface...
Страница 556: ...556 Chapter 25 Using Verity Search Expressions...
Страница 558: ......
Страница 582: ...582 Chapter 26 Retrieving and Formatting Data...
Страница 668: ......
Страница 734: ...734 Chapter 32 Using Web Services...
Страница 760: ...760 Chapter 33 Integrating J2EE and Java Elements in CFML Applications...
Страница 786: ...786 Chapter 34 Integrating COM and CORBA Objects in CFML Applications...
Страница 788: ......
Страница 806: ...806 Chapter 35 Sending and Receiving E Mail...