geirm       01/05/16 15:49:44

  Modified:    src/java/org/apache/velocity/servlet VelocityServlet.java
  Log:
  Symmetrizing the encoding support  - we can do it everywhere else,
  why not here....
  
  Revision  Changes    Path
  1.37      +22 -1     
jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java
  
  Index: VelocityServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity/src/java/org/apache/velocity/servlet/VelocityServlet.java,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- VelocityServlet.java      2001/05/14 19:45:19     1.36
  +++ VelocityServlet.java      2001/05/16 22:49:38     1.37
  @@ -129,7 +129,7 @@
    * @author <a href="mailto:[EMAIL PROTECTED]";>Jon S. Stevens</a>
    * @author <a href="mailto:[EMAIL PROTECTED]";>Geir Magnusson Jr.</a>
    * @author <a href="[EMAIL PROTECTED]">Kent Johnson</a>
  - * $Id: VelocityServlet.java,v 1.36 2001/05/14 19:45:19 geirm Exp $
  + * $Id: VelocityServlet.java,v 1.37 2001/05/16 22:49:38 geirm Exp $
    */
   public abstract class VelocityServlet extends HttpServlet
   {
  @@ -501,6 +501,27 @@
           return Runtime.getTemplate(name);
       }
       
  +    /**
  +     * 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
  +     */
  +    public Template getTemplate( String name, String encoding )
  +        throws ResourceNotFoundException, ParseErrorException, Exception
  +    {
  +        return Runtime.getTemplate( name, encoding );
  +    }
  +
       /**
        * Implement this method to add your application data to the context, 
        * calling the <code>getTemplate()</code> method to produce your return 
  
  
  

Reply via email to