catch (UnsupportedEncodingException encodingEx)
{
throw new PortletException("Unsupported encoding: " + this.scriptSourceUriEncoding);
}
this.groovyCodeSource = new GroovyCodeSource(new File(decodedScriptSourceUri.substring(5)));
}
else if (this.scriptSourceUri.startsWith("classpath:"))
{
String resourceURL = this.groovyClassLoader.getResource(this.scriptSourceUri.substring(10))
.toString();
if (resourceURL.startsWith("file:"))
{
String decodedScriptSourceUri = resourceURL;
try
{
decodedScriptSourceUri = URLDecoder.decode(resourceURL, this.scriptSourceUriEncoding);
}
catch (UnsupportedEncodingException encodingEx)
{
throw new PortletException("Unsupported encoding: " + this.scriptSourceUriEncoding);
}
this.groovyCodeSource = new GroovyCodeSource(new File(decodedScriptSourceUri.substring(5)));
}
else
{
throw new PortletException(SCRIPT_SOURCE_INIT_PARAM
+ " with 'classpath:' prefix should indicate to a local resource");
}
}
else
{
this.groovyCodeSource = new GroovyCodeSource(new File(config.getPortletContext().getRealPath(
this.scriptSourceUri)));
}
}
catch (FileNotFoundException e)
{