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.


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. The following example is from editSendEmail.jsp in ATG Outreach.

<c:url context="${campaignConfiguration.campaignsUIRoot}"
  value="/preview.jsp" var="previewURL">
    <c:param name="targetAssetType" value="${previewAssetTypeParam}"/>
    <c:param name="targetVirtualPath" value="${previewPathParam}"/>
    <c:param name="${previewParams.repositoryItemIdParam}"
    <c:param name="${previewParams.forcePreviewParam}" value="true"/>