{
repo = (StringResourceRepository) ClassUtils.getNewInstance(className);
}
catch (ClassNotFoundException cnfe)
{
throw new VelocityException("Could not find '" + className + "'", cnfe);
}
catch (IllegalAccessException iae)
{
throw new VelocityException("Could not access '" + className + "'", iae);
}
catch (InstantiationException ie)
{
throw new VelocityException("Could not instantiate '" + className + "'", ie);
}
if (encoding != null)
{
repo.setEncoding(encoding);