dlr         00/10/15 12:43:52

  Modified:    src/java/org/apache/velocity/servlet VelocityServlet.java
  Log:
  Reworked JavaDoc a little bit.
  
  Revision  Changes    Path
  1.6       +13 -8     
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.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- VelocityServlet.java      2000/10/15 18:27:37     1.5
  +++ VelocityServlet.java      2000/10/15 19:43:50     1.6
  @@ -73,11 +73,12 @@
   
   /**
    * Base class which simplifies the use of Velocity with Servlets.
  - * Simply extend this class, override the handleRequest method
  - * and add your data to the context. Then call getTemplate("mytemplate.wm")
  + * Extend this class, implement the <code>handleRequest()</code> method, 
  + * and add your data to the context.  Then call 
  + * <code>getTemplate("myTemplate.wm")</code>.
    * 
    * @author Dave Bryson
  - * $Revision: 1.5 $
  + * $Id: VelocityServlet.java,v 1.6 2000/10/15 19:43:50 dlr Exp $
    */
   public abstract class VelocityServlet extends HttpServlet
   {
  @@ -131,7 +132,8 @@
       /**
        * Handle a POST
        */
  -    public void doPost( HttpServletRequest request, HttpServletResponse response )
  +    public void doPost( HttpServletRequest request, 
  +                        HttpServletResponse response )
           throws ServletException, IOException
       {
           doRequest(request, response);
  @@ -140,7 +142,8 @@
       /**
        * Process the request.
        */
  -    private void doRequest(HttpServletRequest request, HttpServletResponse response 
)
  +    private void doRequest(HttpServletRequest request, 
  +                           HttpServletResponse response )
            throws ServletException, IOException
       {
           Context context = new Context();
  @@ -154,7 +157,8 @@
   
           response.setContentType("text/html");
           
  -        FastWriter writer = new FastWriter(response.getOutputStream(), encoding);
  +        FastWriter writer = new FastWriter(response.getOutputStream(), 
  +                                           encoding);
           writer.setAsciiHack(asciiHack);
           template.merge( context, writer );
           writer.flush();
  @@ -174,8 +178,9 @@
       }
       
       /**
  -     * Override the method to add your application data to the context, 
  -     * then call the <code>getTemplate()</code> method.
  +     * Implement this method to add your application data to the context, 
  +     * calling the <code>getTemplate()</code> method to produce your return 
  +     * value.
        *
        * @param ctx The context to add your data to.
        * @return    The template to merge with your context.
  
  
  

Reply via email to