this.environment.changeToLastContext();
String redirectURL = this.environment.getRedirectURL();
if (redirectURL == null) {
EnvironmentStack envStack = CocoonComponentManager.getCurrentEnvironmentStack();
int currentOffset = envStack.getOffset();
try {
CocoonComponentManager.enterEnvironment(this.environment,
this.manager,
this.pipelineProcessor);
this.processingPipeline.prepareInternal(this.environment);
this.sourceValidity = this.processingPipeline.getValidityForEventPipeline();
final String eventPipelineKey = this.processingPipeline.getKeyForEventPipeline();
if ( eventPipelineKey != null ) {
StringBuffer buffer = new StringBuffer(this.systemId);
if ( this.systemId.indexOf('?') == -1) {
buffer.append('?');
} else {
buffer.append('&');
}
buffer.append("pipelinehash=");
buffer.append(eventPipelineKey);
this.systemIdForCaching = buffer.toString();
} else {
this.systemIdForCaching = this.systemId;
}
} finally {
CocoonComponentManager.leaveEnvironment();
envStack.resetOffset(currentOffset);
}
} else {
if (redirectURL.indexOf(":") == -1) {
redirectURL = this.protocol + ":/" + redirectURL;
}