As described above, the preview mechanism uses a context parameter called atg.preview
, which is set in an application’s web.xml
file, to determine whether to initiate a preview user swap for a given request.
<context-param>
<param-name>atg.preview</param-name>
<param-value>false</param-value>
</context-param>
Preview swapping can occur only for applications on the management server that are run with the –layer Preview
switch. However, the atg.preview
parameter must be set to false for any Web applications that do not specifically require preview user swapping. If atg.preview
is not set to false, the preview system assumes that any request to the given Web application is a preview request. Preview requests do not use transient profiles, so atg.preview
should be set to false for any non-previewable apps on the management server to prevent 403 errors occurring if the user is not logged in.
Note that the swap will still occur, regardless of the atg.preview
setting, if the forcePreviewParam
parameter is specified in the request query.