= pageContext.getBooleanDevicePolicyValue("aggregation");
if (!supportsAggregation) {
MarinerURL requestURL = pageContext.getRequestURL(true);
RuntimeDeviceLayout deviceLayout =
pageContext.getDeviceLayout();
String defaultSegmentSrc = getDefaultSegmentSrc(deviceLayout,
pageContext);
if (defaultSegmentSrc != null) {
// Resolve the defaultSegmentSrc relative to the current request URL
MarinerURL url =
new MarinerURL(requestURL, defaultSegmentSrc);
String destination = url.getExternalForm();
if (logger.isDebugEnabled()) {
logger.debug("MontageTag: device "
+ pageContext.getDeviceName()
+ "does not support aggregation."
+ " Sending redirect to "
+ destination);
}
pageContext.sendRedirect(url);
// redirected = true;
return ABORT_PROCESSING;
} else {
throw new PAPIException(exceptionLocalizer.format(
"default-segment-missing-no-aggregation",
new Object[]{pageContext.getDeviceName(),
deviceLayout.getName()}));
}
}
pageContext.endPhase1BeginPhase2();