VolantisProtocol protocol = getProtocol(context);
MarinerPageContext pageContext = getPageContext(context);
try {
pageContext.endPhase1BeginPhase2();
protocol.closeAJAXResponsePage((ResponseBodyAttributes)protocolAttributes);
pageContext.popDeviceLayoutContext();
// This has to happen after close canvas page so that the
// protocol's page and body buffers are closed properly.