if (metaInfo.getCompilationException()!=null) {
throw metaInfo.getCompilationException();
}
// Set up the script context
TemplateVariableBinding parentBinding = null;
boolean hasRequest = request != null;
boolean newParentCreated = false;
if (hasRequest) {
parentBinding = (TemplateVariableBinding) request.getAttribute(GrailsApplicationAttributes.PAGE_SCOPE);
if (parentBinding == null) {
if (webRequest != null) {
parentBinding = new TemplateVariableBinding(new WebRequestTemplateVariableBinding(webRequest));
parentBinding.setRoot(true);
newParentCreated = true;
}
}
}