本文整理了Java中org.apache.velocity.runtime.RuntimeSingleton.getTemplate
方法的一些代码示例,展示了RuntimeSingleton.getTemplate
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。RuntimeSingleton.getTemplate
方法的具体详情如下:
包路径:org.apache.velocity.runtime.RuntimeSingleton
类名称:RuntimeSingleton
方法名:getTemplate
[英]Returns a Template
from the resource manager. This method assumes that the character encoding of the template is set by the input.encoding
property. The default is "ISO-8859-1"
[中]从资源管理器返回Template
。此方法假定模板的字符编码由input.encoding
属性设置。默认值为“ISO-8859-1”
代码示例来源:origin: velocity/velocity-dep
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: org.apache.velocity/velocity-engine-core
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Returns a <code>Template</code> from the resource manager
*
* @param name The name of the desired template.
* @param encoding Character encoding of the template
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Returns a <code>Template</code> from the resource manager
*
* @param name The name of the desired template.
* @param encoding Character encoding of the template
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Retrieves the requested template.
*
* @param name The file name of the template to retrieve relative to the
* template root.
* @return The requested template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public Template getTemplate( String name )
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate(name);
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Retrieves the requested template.
*
* @param name The file name of the template to retrieve relative to the
* template root.
* @return The requested template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public Template getTemplate( String name )
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate(name);
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Returns a <code>Template</code> from the resource manager.
* This method assumes that the character encoding of the
* template is set by the <code>input.encoding</code>
* property. The default is "ISO-8859-1"
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Returns a <code>Template</code> from the resource manager
*
* @param name The name of the desired template.
* @param encoding Character encoding of the template
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Retrieves the requested template.
*
* @param name The file name of the template to retrieve relative to the
* template root.
* @return The requested template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*/
public Template getTemplate( String name )
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate(name);
}
代码示例来源:origin: org.apache.velocity/velocity-engine-core
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @param encoding The character encoding to use for the template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
*
* @since Velocity v1.1
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Returns a <code>Template</code> from the resource manager.
* This method assumes that the character encoding of the
* template is set by the <code>input.encoding</code>
* property. The default is "ISO-8859-1"
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization.
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Returns a <code>Template</code> from the resource manager.
* This method assumes that the character encoding of the
* template is set by the <code>input.encoding</code>
* property. The default is "ISO-8859-1"
*
* @param name The file name of the desired template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization.
*/
public static Template getTemplate(String name)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @param encoding The character encoding to use for the template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
*
* @since Velocity v1.1
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: org.apache.velocity/com.springsource.org.apache.velocity
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @param encoding The character encoding to use for the template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*
* @since Velocity v1.1
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Returns a <code>Template</code> from the Velocity
* resource management system.
*
* @param name The file name of the desired template.
* @param encoding The character encoding to use for the template.
* @return The template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*
* @since Velocity v1.1
*/
public static Template getTemplate(String name, String encoding)
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: velocity/velocity-dep
/**
* Retrieves the requested template with the specified
* character encoding.
*
* @param name The file name of the template to retrieve relative to the
* template root.
* @param encoding the character encoding of the template
*
* @return The requested template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*
* @since Velocity v1.1
*/
public Template getTemplate( String name, String encoding )
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity
/**
* Retrieves the requested template with the specified
* character encoding.
*
* @param name The file name of the template to retrieve relative to the
* template root.
* @param encoding the character encoding of the template
*
* @return The requested template.
* @throws ResourceNotFoundException if template not found
* from any available source.
* @throws ParseErrorException if template cannot be parsed due
* to syntax (or other) error.
* @throws Exception if an error occurs in template initialization
*
* @since Velocity v1.1
*/
public Template getTemplate( String name, String encoding )
throws ResourceNotFoundException, ParseErrorException, Exception
{
return RuntimeSingleton.getTemplate( name, encoding );
}
代码示例来源:origin: webwork/webwork-jira
public static void merge(Context context, String templateName, Writer writer)
{
try
{
Template t = RuntimeSingleton.getTemplate(templateName);
t.merge(context, writer);
//java.io.PrintWriter out = new java.io.PrintWriter(System.out);
//t.merge(context, out);
//out.close();
}
catch(Exception e)
{
log.error(e.getMessage(), e);
}
}
内容来源于网络,如有侵权,请联系作者删除!