You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@velocity.apache.org by he...@apache.org on 2006/11/21 22:52:24 UTC

svn commit: r477914 [23/26] - in /jakarta/velocity/tools/trunk: ./ docs/ docs/generic/ docs/javadoc/ docs/javadoc/org/apache/velocity/tools/generic/ docs/javadoc/org/apache/velocity/tools/generic/log/ docs/javadoc/org/apache/velocity/tools/struts/ docs...

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityLayoutServlet.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityLayoutServlet.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityLayoutServlet.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityLayoutServlet.java Tue Nov 21 13:52:11 2006
@@ -1,22 +1,24 @@
+package org.apache.velocity.tools.view.servlet;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.servlet;
-
-
 import java.io.IOException;
 import java.io.StringWriter;
 import java.io.UnsupportedEncodingException;
@@ -35,7 +37,7 @@
 
 
 /**
- * Extension of the VelocityViewServlet to perform "two-pass" 
+ * Extension of the VelocityViewServlet to perform "two-pass"
  * layout rendering and allow for a customized error screen.
  *
  * For a brief user-guide to this, i suggest trying to track down
@@ -46,7 +48,7 @@
  * @version $Id$
  */
 
-public class VelocityLayoutServlet extends VelocityViewServlet 
+public class VelocityLayoutServlet extends VelocityViewServlet
 {
 
     /** serial version id */
@@ -56,31 +58,31 @@
      * The velocity.properties key for specifying the
      * servlet's error template.
      */
-    public static final String PROPERTY_ERROR_TEMPLATE = 
+    public static final String PROPERTY_ERROR_TEMPLATE =
         "tools.view.servlet.error.template";
 
     /**
      * The velocity.properties key for specifying the
      * relative directory holding layout templates.
      */
-    public static final String PROPERTY_LAYOUT_DIR = 
+    public static final String PROPERTY_LAYOUT_DIR =
         "tools.view.servlet.layout.directory";
 
     /**
      * The velocity.properties key for specifying the
-     * servlet's default layout template's filename. 
+     * servlet's default layout template's filename.
      */
-    public static final String PROPERTY_DEFAULT_LAYOUT = 
+    public static final String PROPERTY_DEFAULT_LAYOUT =
         "tools.view.servlet.layout.default.template";
 
 
     /**
-     * The default error template's filename. 
+     * The default error template's filename.
      */
     public static String DEFAULT_ERROR_TEMPLATE = "Error.vm";
 
     /**
-     * The default layout directory 
+     * The default layout directory
      */
     public static String DEFAULT_LAYOUT_DIR = "layout/";
 
@@ -90,14 +92,14 @@
     public static String DEFAULT_DEFAULT_LAYOUT = "Default.vm";
 
 
-    //TODO? if demand for it exists, these context keys can be 
+    //TODO? if demand for it exists, these context keys can be
     //      made configurable by the velocity.properties
     //      until such time, if anyone really needs to change these,
     //      they are public and aren't final and can be altered
 
     /**
      * The context key that will hold the content of the screen.
-     * 
+     *
      * This key ($screen_content) must be present in the layout
      * template for the current screen to be rendered.
      */
@@ -123,7 +125,7 @@
     public static String KEY_ERROR_STACKTRACE = "stack_trace";
 
     /**
-     * The context key that holds the {@link MethodInvocationException} 
+     * The context key that holds the {@link MethodInvocationException}
      * that broke the rendering of the requested screen.
      *
      * If this value is placed in the context, then $error_cause
@@ -140,12 +142,12 @@
     private VelocityEngine velocity;
 
     /**
-     * Initializes Velocity, the view servlet and checks for changes to 
+     * Initializes Velocity, the view servlet and checks for changes to
      * the initial layout configuration.
      *
      * @param config servlet configuration parameters
      */
-    public void init(ServletConfig config) throws ServletException 
+    public void init(ServletConfig config) throws ServletException
     {
         // first do VVS' init()
         super.init(config);
@@ -154,15 +156,15 @@
         velocity = super.getVelocityEngine();
 
         // check for default template path overrides
-        errorTemplate = 
+        errorTemplate =
             getVelocityProperty(PROPERTY_ERROR_TEMPLATE, DEFAULT_ERROR_TEMPLATE);
-        layoutDir = 
+        layoutDir =
             getVelocityProperty(PROPERTY_LAYOUT_DIR, DEFAULT_LAYOUT_DIR);
-        defaultLayout = 
+        defaultLayout =
             getVelocityProperty(PROPERTY_DEFAULT_LAYOUT, DEFAULT_DEFAULT_LAYOUT);
 
         // preventive error checking! directory must end in /
-        if (!layoutDir.endsWith("/")) 
+        if (!layoutDir.endsWith("/"))
         {
             layoutDir += '/';
         }
@@ -178,7 +180,7 @@
 
 
     /**
-     * Overrides VelocityViewServlet to check the request for 
+     * Overrides VelocityViewServlet to check the request for
      * an alternate layout
      *
      * @param request client request
@@ -186,15 +188,15 @@
      * @return the Context to fill
      */
     protected Context createContext(HttpServletRequest request,
-                                    HttpServletResponse response) 
+                                    HttpServletResponse response)
     {
 
         Context ctx = super.createContext(request, response);
 
-        // check if an alternate layout has been specified 
+        // check if an alternate layout has been specified
         // by way of the request parameters
         String layout = request.getParameter(KEY_LAYOUT);
-        if (layout != null) 
+        if (layout != null)
         {
             // let the template know what its new layout is
             ctx.put(KEY_LAYOUT, layout);
@@ -204,15 +206,15 @@
 
 
     /**
-     * Overrides VelocityViewServlet.mergeTemplate to do a two-pass 
+     * Overrides VelocityViewServlet.mergeTemplate to do a two-pass
      * render for handling layouts
      */
-    protected void mergeTemplate(Template template, 
-                                 Context context, 
+    protected void mergeTemplate(Template template,
+                                 Context context,
                                  HttpServletResponse response)
-        throws ResourceNotFoundException, ParseErrorException, 
+        throws ResourceNotFoundException, ParseErrorException,
                MethodInvocationException, IOException,
-               UnsupportedEncodingException, Exception 
+               UnsupportedEncodingException, Exception
     {
         //
         // this section is based on Tim Colson's "two pass render"
@@ -225,34 +227,34 @@
 
         // Check for an alternate layout
         //
-        // we check after merging the screen template so the screen 
+        // we check after merging the screen template so the screen
         // can overrule any layout set in the request parameters
         // by doing #set( $layout = "MyLayout.vm" )
         Object obj = context.get(KEY_LAYOUT);
         String layout = (obj == null) ? null : obj.toString();
-        if (layout == null) 
+        if (layout == null)
         {
             // no alternate, use default
             layout = defaultLayout;
-        } 
-        else 
+        }
+        else
         {
             // make it a full(er) path
             layout = layoutDir + layout;
         }
 
-        try 
+        try
         {
             //load the layout template
             template = getTemplate(layout);
-        } 
-        catch (Exception e) 
+        }
+        catch (Exception e)
         {
-            velocity.error("VelocityLayoutServlet: Can't load layout \"" + 
+            velocity.error("VelocityLayoutServlet: Can't load layout \"" +
                            layout + "\": " + e);
 
             // if it was an alternate layout we couldn't get...
-            if (!layout.equals(defaultLayout)) 
+            if (!layout.equals(defaultLayout))
             {
                 // try to get the default layout
                 // if this also fails, let the exception go
@@ -268,12 +270,12 @@
     /**
      * Overrides VelocityViewServlet to display user's custom error template
      */
-    protected void error(HttpServletRequest request, 
-                         HttpServletResponse response, 
+    protected void error(HttpServletRequest request,
+                         HttpServletResponse response,
                          Exception e)
-        throws ServletException 
+        throws ServletException
     {
-        try 
+        try
         {
             // get a velocity context
             Context ctx = createContext(request, response);
@@ -281,7 +283,7 @@
             Throwable cause = e;
 
             // if it's an MIE, i want the real cause and stack trace!
-            if (cause instanceof MethodInvocationException) 
+            if (cause instanceof MethodInvocationException)
             {
                 // put the invocation exception in the context
                 ctx.put(KEY_ERROR_INVOCATION_EXCEPTION, e);
@@ -291,7 +293,7 @@
 
             // add the cause to the context
             ctx.put(KEY_ERROR_CAUSE, cause);
-                
+
             // grab the cause's stack trace and put it in the context
             StringWriter sw = new StringWriter();
             cause.printStackTrace(new java.io.PrintWriter(sw));
@@ -301,11 +303,11 @@
             Template et = getTemplate(errorTemplate);
             mergeTemplate(et, ctx, response);
 
-        } 
-        catch (Exception e2) 
+        }
+        catch (Exception e2)
         {
             // d'oh! log this
-            velocity.error("VelocityLayoutServlet: " + 
+            velocity.error("VelocityLayoutServlet: " +
                            " Error during error template rendering - " + e2);
             // then punt the original to a higher authority
             super.error(request, response, e);

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java Tue Nov 21 13:52:11 2006
@@ -1,22 +1,24 @@
+package org.apache.velocity.tools.view.servlet;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.servlet;
-
-
 import java.io.InputStream;
 import java.io.IOException;
 import java.io.OutputStreamWriter;
@@ -73,7 +75,7 @@
  *     relative to the web application root directory. If this parameter
  *     is not present, Velocity is initialized with default settings.</dd>
  * </dl>
- * 
+ *
  * <p>There are methods you may wish to override to access, alter or control
  * any part of the request processing chain.  Please see the javadocs for
  * more information on :
@@ -109,15 +111,15 @@
 
     /** The default content type for the response */
     public static final String DEFAULT_CONTENT_TYPE = "text/html";
-  
+
     /** Default encoding for the output stream */
     public static final String DEFAULT_OUTPUT_ENCODING = "ISO-8859-1";
 
     /**
-     * Key used to access the ServletContext in 
+     * Key used to access the ServletContext in
      * the Velocity application attributes.
      */
-    public static final String SERVLET_CONTEXT_KEY = 
+    public static final String SERVLET_CONTEXT_KEY =
         ServletContext.class.getName();
 
     /**
@@ -131,7 +133,7 @@
      * Key used to access the toolbox configuration file path from the
      * Servlet or webapp init parameters ("org.apache.velocity.toolbox").
      */
-    protected static final String TOOLBOX_KEY = 
+    protected static final String TOOLBOX_KEY =
         "org.apache.velocity.toolbox";
 
     /**
@@ -189,10 +191,10 @@
         initToolbox(config);
 
         // we can get these now that velocity is initialized
-        defaultContentType = 
+        defaultContentType =
             (String)getVelocityProperty(CONTENT_TYPE, DEFAULT_CONTENT_TYPE);
 
-        String encoding = 
+        String encoding =
             (String)getVelocityProperty(RuntimeConstants.OUTPUT_ENCODING,
                                         DEFAULT_OUTPUT_ENCODING);
 
@@ -216,7 +218,7 @@
             }
         }
 
-        velocity.info("VelocityViewServlet: Default content-type is: " + 
+        velocity.info("VelocityViewServlet: Default content-type is: " +
                       defaultContentType);
     }
 
@@ -230,7 +232,7 @@
         // check the servlet config
         String param = config.getInitParameter(key);
 
-        if (param == null || param.length() == 0) 
+        if (param == null || param.length() == 0)
         {
             // check the servlet context
             ServletContext servletContext = config.getServletContext();
@@ -292,7 +294,7 @@
         /* if we have a toolbox, get a manager for it */
         if (file != null)
         {
-            toolboxManager = 
+            toolboxManager =
                 ServletToolboxManager.getInstance(getServletContext(), file);
         }
         else
@@ -303,13 +305,13 @@
 
 
     /**
-     * Initializes the Velocity runtime, first calling 
-     * loadConfiguration(ServletConfig) to get a 
+     * Initializes the Velocity runtime, first calling
+     * loadConfiguration(ServletConfig) to get a
      * org.apache.commons.collections.ExtendedProperties
      * of configuration information
      * and then calling velocityEngine.init().  Override this
-     * to do anything to the environment before the 
-     * initialization of the singleton takes place, or to 
+     * to do anything to the environment before the
+     * initialization of the singleton takes place, or to
      * initialize the singleton in other ways.
      *
      * @param config servlet configuration parameters
@@ -337,8 +339,8 @@
 
             // This is a fatal error...
             throw new ServletException(e);
-        }   
- 
+        }
+
         // Try reading an overriding user Velocity configuration
         try
         {
@@ -349,7 +351,7 @@
         {
             log("VelocityViewServlet: Unable to read Velocity configuration file: ", e);
             log("VelocityViewServlet: Using default Velocity configuration.");
-        }   
+        }
 
         // now all is ready - init Velocity
         try
@@ -398,10 +400,10 @@
         return defaultProperties;
     }
 
-     
+
     /**
-     *  Loads the configuration information and returns that 
-     *  information as an ExtendedProperties, which will be used to 
+     *  Loads the configuration information and returns that
+     *  information as an ExtendedProperties, which will be used to
      *  initialize the Velocity runtime.
      *  <br><br>
      *  Currently, this method gets the initialization parameter
@@ -432,7 +434,7 @@
      *       &lt;description&gt; Path to Velocity configuration &lt;/description&gt;
      *    &lt;/context-param&gt;
      *   </pre>
-     * 
+     *
      *  Derived classes may do the same, or take advantage of this code to do the loading for them via :
      *   <pre>
      *      ExtendedProperties p = super.loadConfiguration(config);
@@ -451,7 +453,7 @@
     {
         // grab the path to the custom props file (if any)
         String propsFile = findInitParameter(config, INIT_PROPS_KEY);
-        
+
         ExtendedProperties p = new ExtendedProperties();
         if (propsFile != null)
         {
@@ -468,7 +470,7 @@
         return p;
     }
 
-          
+
     /**
      * Handles GET - calls doRequest()
      */
@@ -495,7 +497,7 @@
      *  @param request  HttpServletRequest object containing client request
      *  @param response HttpServletResponse object for the response
      */
-    protected void doRequest(HttpServletRequest request, 
+    protected void doRequest(HttpServletRequest request,
                              HttpServletResponse response)
          throws ServletException, IOException
     {
@@ -504,12 +506,12 @@
         {
             // first, get a context
             context = createContext(request, response);
-            
-            // set the content type 
+
+            // set the content type
             setContentType(request, response);
 
             // get the template
-            Template template = handleRequest(request, response, context);        
+            Template template = handleRequest(request, response, context);
 
             // bail if we can't find the template
             if (template == null)
@@ -540,22 +542,22 @@
 
     /**
      * Cleanup routine called at the end of the request processing sequence
-     * allows a derived class to do resource cleanup or other end of 
+     * allows a derived class to do resource cleanup or other end of
      * process cycle tasks.  This default implementation does nothing.
      *
-     * @param request servlet request from client 
-     * @param response servlet reponse 
+     * @param request servlet request from client
+     * @param response servlet reponse
      * @param context Context created by the {@link #createContext}
      */
-    protected void requestCleanup(HttpServletRequest request, 
-                                  HttpServletResponse response, 
+    protected void requestCleanup(HttpServletRequest request,
+                                  HttpServletResponse response,
                                   Context context)
     {
     }
 
 
     /**
-     * <p>Handle the template processing request.</p> 
+     * <p>Handle the template processing request.</p>
      *
      * @param request client request
      * @param response client response
@@ -563,8 +565,8 @@
      *
      * @return Velocity Template object or null
      */
-    protected Template handleRequest(HttpServletRequest request, 
-                                     HttpServletResponse response, 
+    protected Template handleRequest(HttpServletRequest request,
+                                     HttpServletResponse response,
                                      Context ctx)
         throws Exception
     {
@@ -581,7 +583,7 @@
      * <pre>
      *
      *    response.setContentType(defaultContentType);
-     * 
+     *
      * </pre>
      * where defaultContentType is set to the value of the default.contentType
      * property, or "text/html" if that is not set.</p>
@@ -589,7 +591,7 @@
      * @param request servlet request from client
      * @param response servlet reponse to client
      */
-    protected void setContentType(HttpServletRequest request, 
+    protected void setContentType(HttpServletRequest request,
                                   HttpServletResponse response)
     {
         response.setContentType(defaultContentType);
@@ -597,18 +599,18 @@
 
 
     /**
-     * <p>Creates and returns an initialized Velocity context.</p> 
-     * 
-     * A new context of class {@link ChainedContext} is created and 
+     * <p>Creates and returns an initialized Velocity context.</p>
+     *
+     * A new context of class {@link ChainedContext} is created and
      * initialized.
      *
      * @param request servlet request from client
      * @param response servlet reponse to client
      */
-    protected Context createContext(HttpServletRequest request, 
+    protected Context createContext(HttpServletRequest request,
                                     HttpServletResponse response)
     {
-        ChainedContext ctx = 
+        ChainedContext ctx =
             new ChainedContext(velocity, request, response, getServletContext());
 
         /* if we have a toolbox manager, get a toolbox from it */
@@ -623,7 +625,7 @@
     /**
      * Retrieves the requested template.
      *
-     * @param name The file name of the template to retrieve relative to the 
+     * @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
@@ -638,11 +640,11 @@
         return velocity.getTemplate(name);
     }
 
-    
+
     /**
      * Retrieves the requested template with the specified character encoding.
      *
-     * @param name The file name of the template to retrieve relative to the 
+     * @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.
@@ -667,11 +669,11 @@
      * @param context Context created by the {@link #createContext}
      * @param response servlet reponse (used to get a Writer)
      */
-    protected void mergeTemplate(Template template, 
-                                 Context context, 
+    protected void mergeTemplate(Template template,
+                                 Context context,
                                  HttpServletResponse response)
-        throws ResourceNotFoundException, ParseErrorException, 
-               MethodInvocationException, IOException, 
+        throws ResourceNotFoundException, ParseErrorException,
+               MethodInvocationException, IOException,
                UnsupportedEncodingException, Exception
     {
         VelocityWriter vw = null;
@@ -699,7 +701,7 @@
                     // don't close to allow us to play
                     // nicely with others.
                     vw.flush();
-                    /* This hack sets the VelocityWriter's internal ref to the 
+                    /* This hack sets the VelocityWriter's internal ref to the
                      * PrintWriter to null to keep memory free while
                      * the writer is pooled. See bug report #18951 */
                     vw.recycle(null);
@@ -707,17 +709,17 @@
                 }
                 catch (Exception e)
                 {
-                    velocity.debug("VelocityViewServlet: " + 
+                    velocity.debug("VelocityViewServlet: " +
                                    "Trouble releasing VelocityWriter: " +
                                    e.getMessage());
-                }                
+                }
             }
         }
     }
 
 
     /**
-     * This is here so developers may override it and gain access to the 
+     * This is here so developers may override it and gain access to the
      * Writer which the template will be merged into.  See
      * <a href="http://issues.apache.org/jira/browse/VELTOOLS-7">VELTOOLS-7</a>
      * for discussion of this.
@@ -733,18 +735,18 @@
         template.merge(context, writer);
     }
 
- 
+
     /**
      * Invoked when there is an error thrown in any part of doRequest() processing.
      * <br><br>
      * Default will send a simple HTML response indicating there was a problem.
-     * 
+     *
      * @param request original HttpServletRequest from servlet container.
      * @param response HttpServletResponse object from servlet container.
      * @param e  Exception that was thrown by some other part of process.
      */
-    protected void error(HttpServletRequest request, 
-                         HttpServletResponse response, 
+    protected void error(HttpServletRequest request,
+                         HttpServletResponse response,
                          Exception e)
         throws ServletException
     {
@@ -766,7 +768,7 @@
             }
 
             // if it's an MIE, i want the real stack trace!
-            if (cause instanceof MethodInvocationException) 
+            if (cause instanceof MethodInvocationException)
             {
                 // get the real cause
                 cause = ((MethodInvocationException)cause).getWrappedThrowable();

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java Tue Nov 21 13:52:11 2006
@@ -1,20 +1,23 @@
+package org.apache.velocity.tools.view.servlet;
+
 /*
- * Copyright 2003-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
-package org.apache.velocity.tools.view.servlet;
 
 import java.io.File;
 import java.io.InputStream;

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/package.html
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/package.html?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/package.html (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/package.html Tue Nov 21 13:52:11 2006
@@ -1,10 +1,28 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
 <head>
 <!--
 
   These are Javadoc package comments.
-  
+
 -->
 </head>
 <body bgcolor="white">
@@ -16,12 +34,12 @@
 ##### THIS IS THE TEMPLATE FOR THE PACKAGE DOC COMMENTS. #####
 ##### TYPE YOUR PACKAGE COMMENTS HERE.  BEGIN WITH A     #####
 ##### ONE-SENTENCE SUMMARY STARTING WITH A VERB LIKE:    #####
-Provides for.... 
+Provides for....
 -->
 
 <h2>Package Specification</h2>
 
-<!-- 
+<!--
 ##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
 <ul>
   <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/velocity.properties
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/velocity.properties?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/velocity.properties (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/servlet/velocity.properties Tue Nov 21 13:52:11 2006
@@ -1,3 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
 # default to servletlogger, which logs to the servlet engines log
 runtime.log.logsystem.class = org.apache.velocity.tools.view.servlet.ServletLogger
 

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractPagerTool.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
@@ -26,7 +29,7 @@
 import org.apache.velocity.tools.view.context.ViewContext;
 
 /**
- * <p>Abstract view tool for doing request-based pagination of 
+ * <p>Abstract view tool for doing request-based pagination of
  * items in an a list.
  * </p>
  * <p><b>Usage:</b><br>
@@ -116,15 +119,15 @@
     public static final int DEFAULT_SLIP_SIZE = 20;
 
     /** the key under which items are stored in session */
-    protected static final String STORED_ITEMS_KEY = 
+    protected static final String STORED_ITEMS_KEY =
         AbstractPagerTool.class.getName();
-    
+
     private List items;
     private int index = 0;
     private int slipSize = DEFAULT_SLIP_SIZE;
-    private int itemsPerPage = DEFAULT_ITEMS_PER_PAGE;    
+    private int itemsPerPage = DEFAULT_ITEMS_PER_PAGE;
     protected HttpSession session;
-    
+
     /**
      * Initializes this instance by grabbing the request
      * and session objects from the current ViewContext.
@@ -137,13 +140,13 @@
         ViewContext context = (ViewContext)obj;
         HttpServletRequest request = context.getRequest();
         session = request.getSession(false);
-        setup(request);        
+        setup(request);
     }
-    
+
     /**
      * Abstract method to make it as obvious as possible just
      * where implementing classes should be retrieving and configuring
-     * display parameters. 
+     * display parameters.
      * <p>A simple implementation would be:
      * <pre>
      * public void setup(HttpServletRequest req)
@@ -157,7 +160,7 @@
      * @param request the current HttpServletRequest
      */
     public abstract void setup(HttpServletRequest request);
-    
+
     /*  ---------------------- mutators ----------------------------- */
 
 
@@ -171,7 +174,7 @@
         index = 0;
         itemsPerPage = DEFAULT_ITEMS_PER_PAGE;
     }
-    
+
     /**
      * Sets the List to page through.
      *
@@ -181,8 +184,8 @@
     {
         this.items = items;
         setStoredItems(items);
-    }    
-    
+    }
+
     /**
      * Sets the index of the first result in the current page
      *
@@ -196,8 +199,8 @@
             index = 0;
         }
         this.index = index;
-    }    
-    
+    }
+
     /**
      * Sets the number of items returned in a page of items
      *
@@ -212,7 +215,7 @@
         }
         this.itemsPerPage = itemsPerPage;
     }
-    
+
     /**
      * Sets the number of result page indices for {@link #getSlip} to list.
      * (for google-ish result page links).
@@ -229,7 +232,7 @@
         }
         this.slipSize = slipSize;
     }
-    
+
     /*  ---------------------- accessors ----------------------------- */
 
     /**
@@ -243,10 +246,10 @@
     }
 
     /**
-     * Returns the number of result page indices {@link #getSlip} 
+     * Returns the number of result page indices {@link #getSlip}
      * will return per request (if available).
      *
-     * @return the number of result page indices {@link #getSlip} 
+     * @return the number of result page indices {@link #getSlip}
      *         will try to return
      */
     public int getSlipSize()
@@ -288,13 +291,13 @@
         {
             items = getStoredItems();
         }
-        
+
         return (items != null) ? items : Collections.EMPTY_LIST;
-    }    
-    
+    }
+
     /**
      * Returns the index of the last item on the current page of results
-     * (as determined by the current index, items per page, and 
+     * (as determined by the current index, items per page, and
      * the number of items).  If there is no current page, then null is
      * returned.
      *
@@ -313,7 +316,7 @@
 
     /**
      * Returns the index for the next page of items
-     * (as determined by the current index, items per page, and 
+     * (as determined by the current index, items per page, and
      * the number of items).  If no "next page" exists, then null is
      * returned.
      *
@@ -331,7 +334,7 @@
 
     /**
      * Returns the index of the first item on the current page of results
-     * (as determined by the current index, items per page, and 
+     * (as determined by the current index, items per page, and
      * the number of items).  If there is no current page, then null is
      * returned. This is different than {@link #getIndex()} in that it
      * is adjusted to fit the reality of the items available and is not a
@@ -352,7 +355,7 @@
 
     /**
      * Return the index for the previous page of items
-     * (as determined by the current index, items per page, and 
+     * (as determined by the current index, items per page, and
      * the number of items).  If no "next page" exists, then null is
      * returned.
      *
@@ -367,7 +370,7 @@
         }
         return null;
     }
-    
+
     /**
      * Returns the number of pages that can be made from this list
      * given the set number of items per page.
@@ -395,13 +398,13 @@
         int end = getLastIndex().intValue() + 1;
         return getItems().subList(start, end);
     }
-    
+
     /**
      * Returns the "page number" for the specified index.  Because the page
      * number is used for the user interface, the page numbers are 1-based.
      *
      * @param i the index that you want the page number for
-     * @return the approximate "page number" for the specified index or 
+     * @return the approximate "page number" for the specified index or
      *         <code>null</code> if there are no items
      */
     public Integer getPageNumber(int i)
@@ -418,7 +421,7 @@
      * Returns the "page number" for the current index.  Because the page
      * number is used for the user interface, the page numbers are 1-based.
      *
-     * @return the approximate "page number" for the current index or 
+     * @return the approximate "page number" for the current index or
      *         <code>null</code> if there are no items
      */
     public Integer getPageNumber()
@@ -441,11 +444,11 @@
 
     /**
      * <p>Returns a description of the current page.  This implementation
-     * displays a 1-based range of result indices and the total number 
+     * displays a 1-based range of result indices and the total number
      * of items.  (e.g. "1 - 10 of 42" or "7 of 7")  If there are no items,
      * this will return "0 of 0".</p>
      *
-     * <p>Sub-classes may override this to provide a customized 
+     * <p>Sub-classes may override this to provide a customized
      * description (such as one in another language).</p>
      *
      * @return a description of the current page
@@ -477,21 +480,21 @@
         }
         return out.toString();
     }
-    
+
     /**
      * Returns a <b>S</b>liding <b>L</b>ist of <b>I</b>ndices for <b>P</b>ages
      * of items.
      *
      * <p>Essentially, this returns a list of item indices that correspond
-     * to available pages of items (as based on the set items-per-page). 
-     * This makes it relativly easy to do a google-ish set of links to 
+     * to available pages of items (as based on the set items-per-page).
+     * This makes it relativly easy to do a google-ish set of links to
      * available pages.</p>
      *
      * <p>Note that this list of Integers is 0-based to correspond with the
      * underlying result indices and not the displayed page numbers (see
      * {@link #getPageNumber}).</p>
      *
-     * @return {@link List} of Integers representing the indices of result 
+     * @return {@link List} of Integers representing the indices of result
      *         pages or empty list if there's one or less pages available
      */
     public List getSlip()
@@ -506,7 +509,7 @@
         /* page number is 1-based so decrement it */
         int curPg = getPageNumber().intValue() - 1;
 
-        /* start at zero or just under half of max slip size 
+        /* start at zero or just under half of max slip size
          * this keeps "forward" and "back" pages about even
          * but gives preference to "forward" pages */
         int slipStart = Math.max(0, (curPg - (slipSize / 2)));
@@ -514,7 +517,7 @@
         /* push slip end as far as possible */
         int slipEnd = Math.min(totalPgs, (slipStart + slipSize));
 
-        /* if we're out of "forward" pages, then push the 
+        /* if we're out of "forward" pages, then push the
          * slip start toward zero to maintain slip size */
         if (slipEnd - slipStart < slipSize)
         {

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/AbstractSearchTool.java Tue Nov 21 13:52:11 2006
@@ -1,23 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003-2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-
-package org.apache.velocity.tools.view.tools;
-
-
 import java.util.Collections;
 import java.util.List;
 
@@ -40,7 +41,7 @@
  * list index, and optionally, the number of items to display
  * per page of results.  Upon extracting these parameters, they
  * should be set using the provided setCriteria(Object),
- * setIndex(int), and setItemsPerPage(int) methods. A simple 
+ * setIndex(int), and setItemsPerPage(int) methods. A simple
  * implementation would be:
  * <pre>
  * public void setup(HttpServletRequest req)
@@ -133,7 +134,7 @@
 public abstract class AbstractSearchTool extends AbstractPagerTool
 {
     /** the key under which StoredResults are kept in session */
-    protected static final String STORED_RESULTS_KEY = 
+    protected static final String STORED_RESULTS_KEY =
         StoredResults.class.getName();
 
     private Object criteria;
@@ -240,7 +241,7 @@
     {
         StoredResults sr = getStoredResults();
 
-        /* if the criteria equals that of the stored results, 
+        /* if the criteria equals that of the stored results,
          * then return the stored result list */
         if (sr != null && criteria.equals(sr.getCriteria()))
         {
@@ -258,7 +259,7 @@
 
     /**
      * Executes a query for the specified criteria.
-     * 
+     *
      * <p>This method must be implemented! A simple
      * implementation might be something like:
      * <pre>
@@ -267,7 +268,7 @@
      *     return MyDbUtils.getFooBarsMatching((String)crit);
      * }
      * </pre>
-     * 
+     *
      * @return a {@link List} of results for this query
      */
     protected abstract List executeQuery(Object criteria);

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/BrowserSnifferTool.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003-2005 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
 import java.util.regex.PatternSyntaxException;
@@ -151,7 +154,7 @@
     public boolean getNetscape()
     {
         return !getFirefox() && !getSafari() && test("mozilla") &&
-               !test("spoofer") && !test("compatible") && !test("opera") && 
+               !test("spoofer") && !test("compatible") && !test("opera") &&
                !test("webtv") && !test("hotjava");
     }
 
@@ -462,10 +465,10 @@
     public boolean getRobot()
     {
         return getWget() || getGetright() || getLwp() || getYahoo() ||
-               getGoogle() || getAltavista() || getScooter() || getLycos() || 
-               getInfoseek() || getWebcrawler() || getLinkexchange() || 
+               getGoogle() || getAltavista() || getScooter() || getLycos() ||
+               getInfoseek() || getWebcrawler() || getLinkexchange() ||
                test("bot") || test("spider") || test("crawl") ||
-               test("agent") || test("seek") || test("search") || 
+               test("agent") || test("seek") || test("search") ||
                test("reap") || test("worm") || test("find") || test("index") ||
                test("copy") || test("fetch") || test("ia_archive") ||
                test("zyborg");
@@ -501,10 +504,10 @@
     public boolean getWap()
     {
         return test("up.browser") || test("nokia") || test("alcatel") ||
-               test("ericsson") || userAgent.indexOf("sie-") == 0 || 
-               test("wmlib") || test(" wap") || test("wap ") || 
+               test("ericsson") || userAgent.indexOf("sie-") == 0 ||
+               test("wmlib") || test(" wap") || test("wap ") ||
                test("wap/") || test("-wap") || test("wap-") ||
-               userAgent.indexOf("wap") == 0 || 
+               userAgent.indexOf("wap") == 0 ||
                test("wapper") || test("zetor");
     }
 
@@ -563,14 +566,14 @@
 
     public boolean getWin32()
     {
-        return getWin95() || getWin98() || getWinnt() || getWin2k() || 
+        return getWin95() || getWin98() || getWinnt() || getWin2k() ||
                getWinxp() || getWinme() || test("win32");
     }
 
     public boolean getWindows()
     {
-        return getWin16() || getWin31() || getWin95() || getWin98() || 
-               getWinnt() || getWin32() || getWin2k() || getWinme() || 
+        return getWin16() || getWin31() || getWin95() || getWin98() ||
+               getWinnt() || getWin32() || getWin2k() || getWinme() ||
                test("win");
     }
 
@@ -738,7 +741,7 @@
     public boolean getUnix()
     {
         return getX11() || getSun() || getIrix() || getHpux() || getSco() ||
-               getUnixware() || getMpras() || getReliant() || getDec() || 
+               getUnixware() || getMpras() || getReliant() || getDec() ||
                getLinux() || getBsd() || test("unix");
     }
 
@@ -754,12 +757,12 @@
 
     public boolean getCss()
     {
-        return (getIe() && getMajorVersion() >= 4) || 
-               (getNetscape() && getMajorVersion() >= 4) || 
-               getGecko() || 
-               getKonqueror() || 
-               (getOpera() && getMajorVersion() >= 3) || 
-               getSafari() || 
+        return (getIe() && getMajorVersion() >= 4) ||
+               (getNetscape() && getMajorVersion() >= 4) ||
+               getGecko() ||
+               getKonqueror() ||
+               (getOpera() && getMajorVersion() >= 3) ||
+               getSafari() ||
                getLinks();
     }
 
@@ -772,37 +775,37 @@
     {
         return getIe() &&
                (getMac() && getMajorVersion() >= 5) ||
-               (getWin32() && getMajorVersion() >= 6) || 
+               (getWin32() && getMajorVersion() >= 6) ||
                getGecko() || // && version >= ?
-               (getOpera() && getMajorVersion() >= 4) || 
-               (getSafari() && getMajorVersion() >= 2) || 
+               (getOpera() && getMajorVersion() >= 4) ||
+               (getSafari() && getMajorVersion() >= 2) ||
                (getKonqueror() && getMajorVersion() >= 2);
     }
 
     public boolean getDom0()
     {
-        return (getIe() && getMajorVersion() >= 3) || 
-               (getNetscape() && getMajorVersion() >= 2) || 
-               (getOpera() && getMajorVersion() >= 3) || 
-               getGecko() || 
-               getSafari() || 
+        return (getIe() && getMajorVersion() >= 3) ||
+               (getNetscape() && getMajorVersion() >= 2) ||
+               (getOpera() && getMajorVersion() >= 3) ||
+               getGecko() ||
+               getSafari() ||
                getKonqueror();
     }
 
     public boolean getDom1()
     {
-        return (getIe() && getMajorVersion() >= 5) || 
-               getGecko() || 
-               (getSafari() && getMajorVersion() >= 2) || 
-               (getOpera() && getMajorVersion() >= 4) || 
+        return (getIe() && getMajorVersion() >= 5) ||
+               getGecko() ||
+               (getSafari() && getMajorVersion() >= 2) ||
+               (getOpera() && getMajorVersion() >= 4) ||
                (getKonqueror() && getMajorVersion() >= 2);
     }
 
     public boolean getDom2()
     {
-        return (getIe() && getMajorVersion() >= 6) || 
-               (getMozilla() && getMajorVersion() >= 5.0) || 
-               (getOpera() && getMajorVersion() >= 7) || 
+        return (getIe() && getMajorVersion() >= 6) ||
+               (getMozilla() && getMajorVersion() >= 5.0) ||
+               (getOpera() && getMajorVersion() >= 7) ||
                getFirefox();
     }
 
@@ -1032,6 +1035,6 @@
             // where should I log ?!
         }
     }
-    
-    
+
+
 }

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/Configurable.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/Configurable.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/Configurable.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/Configurable.java Tue Nov 21 13:52:11 2006
@@ -1,20 +1,23 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2004 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
-package org.apache.velocity.tools.view.tools;
 
 import java.util.Map;
 

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/CookieTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/CookieTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/CookieTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/CookieTool.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import javax.servlet.http.Cookie;
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
@@ -81,7 +84,7 @@
      * Returns the Cookie with the specified name, if it exists.
      *
      * <p>So, if you had a cookie named 'foo', you'd get it's value
-     * by <code>$cookies.foo.value</code> or it's max age 
+     * by <code>$cookies.foo.value</code> or it's max age
      * by <code>$cookies.foo.maxAge</code></p>
      */
     public Cookie get(String name)

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ImportTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ImportTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ImportTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ImportTool.java Tue Nov 21 13:52:11 2006
@@ -1,20 +1,23 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
-
-package org.apache.velocity.tools.view.tools;
 
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/LinkTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/LinkTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/LinkTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/LinkTool.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.net.URLEncoder;
@@ -33,7 +36,7 @@
 import org.apache.velocity.tools.view.context.ViewContext;
 
 /**
- * View tool to make building URIs pleasant and fun! 
+ * View tool to make building URIs pleasant and fun!
  * <p><pre>
  * Template example(s):
  *   #set( $base = $link.relative('MyPage.vm').anchor('view') )
@@ -59,39 +62,39 @@
 {
     protected static final Log LOG = LogFactory.getLog(LinkTool.class);
 
-    /** Standard HTML delimiter for query data ('&') */ 
+    /** Standard HTML delimiter for query data ('&') */
     public static final String HTML_QUERY_DELIMITER = "&";
 
-    /** XHTML delimiter for query data ('&amp;amp;') */ 
+    /** XHTML delimiter for query data ('&amp;amp;') */
     public static final String XHTML_QUERY_DELIMITER = "&amp;";
 
 
-    /** A reference to the ServletContext */ 
+    /** A reference to the ServletContext */
     protected ServletContext application;
 
-    /** A reference to the HttpServletRequest. */ 
+    /** A reference to the HttpServletRequest. */
     protected HttpServletRequest request;
 
-    /** A reference to the HttpServletResponse. */ 
+    /** A reference to the HttpServletResponse. */
     protected HttpServletResponse response;
 
 
-    /** The URI reference set for this link. */ 
+    /** The URI reference set for this link. */
     private String uri;
 
-    /** The anchor set for this link. */ 
+    /** The anchor set for this link. */
     private String anchor;
 
-    /** A list of query string parameters. */ 
+    /** A list of query string parameters. */
     private ArrayList queryData;
 
     /** The current delimiter for query data */
     private String queryDataDelim;
 
-    
+
     /** Java 1.4 encode method to use instead of deprecated 1.3 version. */
     private static Method encode = null;
-    
+
     /* Initialize the encode variable with the 1.4 method if available.
      * this code was adapted from org.apache.struts.utils.RequestUtils */
     static
@@ -137,7 +140,7 @@
      */
     protected void setXhtml(boolean useXhtml)
     {
-        queryDataDelim = 
+        queryDataDelim =
             (useXhtml) ? XHTML_QUERY_DELIMITER : HTML_QUERY_DELIMITER;
     }
 
@@ -154,7 +157,7 @@
         LinkTool copy = duplicate();
         if (copy.queryData != null)
         {
-            // set the copy's query data to a shallow clone of 
+            // set the copy's query data to a shallow clone of
             // the current query data array
             copy.queryData = (ArrayList)this.queryData.clone();
         }
@@ -181,7 +184,7 @@
         LinkTool copy = duplicate();
         if (copy.queryData != null)
         {
-            // set the copy's query data to a shallow clone of 
+            // set the copy's query data to a shallow clone of
             // the current query data array
             copy.queryData = (ArrayList)this.queryData.clone();
         }
@@ -217,7 +220,7 @@
     /**
      * For internal use.
      *
-     * Copies 'that' LinkTool into this one and sets the new 
+     * Copies 'that' LinkTool into this one and sets the new
      * anchor for the link.
      *
      * @param anchor URI string
@@ -279,7 +282,7 @@
         {
             throw new IllegalArgumentException("Tool can only be initialized with a ViewContext");
         }
- 
+
         ViewContext context = (ViewContext)obj;
         this.request = context.getRequest();
         this.response = context.getResponse();
@@ -295,7 +298,7 @@
     // --------------------------------------------- Template Methods -----------
 
     /**
-     * <p>Returns a copy of the link with the specified anchor to be 
+     * <p>Returns a copy of the link with the specified anchor to be
      *    added to the end of the generated hyperlink.</p>
      *
      * Example:<br>
@@ -332,16 +335,16 @@
 
     /**
      * <p>Returns a copy of the link with the specified context-relative
-     * URI reference converted to a server-relative URI reference. This 
-     * method will overwrite any previous URI reference settings but will 
-     * copy the query string.</p> 
+     * URI reference converted to a server-relative URI reference. This
+     * method will overwrite any previous URI reference settings but will
+     * copy the query string.</p>
      *
      * Example:<br>
      * <code>&lt;a href='$link.setRelative("/templates/login/index.vm")'&gt;Login Page&lt;/a&gt;</code><br>
      * produces something like</br>
      * <code>&lt;a href="/myapp/templates/login/index.vm"&gt;Login Page&lt;/a&gt;</code><br>
      *
-     * @param uri A context-relative URI reference. A context-relative URI 
+     * @param uri A context-relative URI reference. A context-relative URI
      * is a URI that is relative to the root of this web application.
      *
      * @return a new instance of LinkTool with the specified URI
@@ -378,8 +381,8 @@
     /**
      * <p>Returns a copy of the link with the specified URI reference
      * either used as or converted to an absolute (non-relative)
-     * URI reference. This method will overwrite any previous URI 
-     * reference settings but will copy the query string.</p> 
+     * URI reference. This method will overwrite any previous URI
+     * reference settings but will copy the query string.</p>
      *
      * Example:<br>
      * <code>&lt;a href='$link.setAbsolute("/templates/login/index.vm")'&gt;Login Page&lt;/a&gt;</code><br>
@@ -428,13 +431,13 @@
 
 
     /**
-     * <p>Returns a copy of the link with the given URI reference set. 
-     * No conversions are applied to the given URI reference. The URI 
+     * <p>Returns a copy of the link with the given URI reference set.
+     * No conversions are applied to the given URI reference. The URI
      * reference can be absolute, server-relative, relative and may
-     * contain query parameters. This method will overwrite any 
-     * previous URI reference settings but will copy the query 
+     * contain query parameters. This method will overwrite any
+     * previous URI reference settings but will copy the query
      * string.</p>
-     * 
+     *
      * @param uri URI reference to set
      *
      * @return a new instance of LinkTool
@@ -454,9 +457,9 @@
     }
 
     /**
-     * <p>Returns the current URI of this link as set by the setURI(String) 
-     * or setRelative(String) methods. Any conversions 
-     * have been applied. The returned URI reference does not include query 
+     * <p>Returns the current URI of this link as set by the setURI(String)
+     * or setRelative(String) methods. Any conversions
+     * have been applied. The returned URI reference does not include query
      * data that was added with method addQueryData().</p>
      */
     public String getURI()
@@ -466,7 +469,7 @@
 
 
     /**
-     * <p>Adds a key=value pair to the query data. This returns a new LinkTool 
+     * <p>Adds a key=value pair to the query data. This returns a new LinkTool
      * containing both a copy of this LinkTool's query data and the new data.
      * Query data is URL encoded before it is appended.</p>
      *
@@ -481,7 +484,7 @@
     }
 
     /**
-     * <p>Adds multiple key=value pairs to the query data. 
+     * <p>Adds multiple key=value pairs to the query data.
      * This returns a new LinkTool containing both a copy of
      * this LinkTool's query data and the new data.
      * Query data is URL encoded before it is appended.</p>
@@ -513,9 +516,9 @@
     {
         return copyWith(parameters);
     }
-    
+
     /**
-     * <p>Returns this link's query data as a url-encoded string e.g. 
+     * <p>Returns this link's query data as a url-encoded string e.g.
      * <code>key=value&foo=this+is+encoded</code>.</p>
      */
     public String getQueryData()
@@ -539,9 +542,9 @@
 
 
     /**
-     * <p>Returns the URI that addresses this web application. E.g. 
-     * <code>http://myserver.net/myapp</code>. This string does not end 
-     * with a "/".  Note! This will not represent any URI reference or 
+     * <p>Returns the URI that addresses this web application. E.g.
+     * <code>http://myserver.net/myapp</code>. This string does not end
+     * with a "/".  Note! This will not represent any URI reference or
      * query data set for this LinkTool.</p>
      */
     public String getContextURL()
@@ -565,10 +568,10 @@
 
 
     /**
-     * <p>Returns the context path that addresses this web 
-     * application, e.g. <code>/myapp</code>. This string starts 
-     * with a "/" but does not end with a "/" Note! This will not 
-     * represent any URI reference or query data set for this 
+     * <p>Returns the context path that addresses this web
+     * application, e.g. <code>/myapp</code>. This string starts
+     * with a "/" but does not end with a "/" Note! This will not
+     * represent any URI reference or query data set for this
      * LinkTool.</p>
      */
     public String getContextPath()
@@ -580,9 +583,9 @@
     /**
      * Returns the full URI of this template without any query data.
      * e.g. <code>http://myserver.net/myapp/stuff/View.vm</code>
-     * Note! The returned String will not represent any URI reference 
-     * or query data set for this LinkTool. A typical application of 
-     * this method is with the HTML base tag. For example:  
+     * Note! The returned String will not represent any URI reference
+     * or query data set for this LinkTool. A typical application of
+     * this method is with the HTML base tag. For example:
      * <code>&lt;base href="$link.baseRef"&gt;</code>
      */
     public String getBaseRef()
@@ -594,12 +597,12 @@
     }
 
 
-    /** 
-     * Returns the full URI reference that's been built with this tool, 
-     * including the query string and anchor, e.g. 
+    /**
+     * Returns the full URI reference that's been built with this tool,
+     * including the query string and anchor, e.g.
      * <code>http://myserver.net/myapp/stuff/View.vm?id=42&type=blue#foo</code>.
      * Typically, it is not necessary to call this method explicitely.
-     * Velocity will call the toString() method automatically to obtain 
+     * Velocity will call the toString() method automatically to obtain
      * a representable version of an object.
      */
     public String toString()
@@ -609,7 +612,7 @@
         if (uri != null)
         {
             out.append(uri);
-        } 
+        }
 
         String query = getQueryData();
         if (query != null)
@@ -617,7 +620,7 @@
             // Check if URI already contains query data
             if ( uri == null || uri.indexOf('?') < 0)
             {
-                // no query data yet, start query data with '?'    
+                // no query data yet, start query data with '?'
                 out.append('?');
             }
             else
@@ -655,7 +658,7 @@
         {
             try
             {
-                Object[] args = 
+                Object[] args =
                     new Object[] { url, this.response.getCharacterEncoding() };
                 return (String)encode.invoke(null, args);
             }
@@ -677,9 +680,9 @@
     }
 
 
-  
+
     // --------------------------------------------- Internal Class -----------
- 
+
     /**
      * Internal util class to handle representation and
      * encoding of key/value pairs in the query string
@@ -697,7 +700,7 @@
          * @param key query pair
          * @param value query value
          */
-        public QueryPair(String key, Object value) 
+        public QueryPair(String key, Object value)
         {
             this.key = key;
             this.value = value;
@@ -705,7 +708,7 @@
 
         /**
          * Return the URL-encoded query string.
-         */ 
+         */
         public String toString()
         {
             StringBuffer out = new StringBuffer();
@@ -721,7 +724,7 @@
             }
             else if (value instanceof Object[])
             {
-                appendAsArray(out, key, (Object[])value); 
+                appendAsArray(out, key, (Object[])value);
             }
             else
             {

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003-2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.util.Map;
@@ -71,7 +74,7 @@
      * Initializes this instance.
      *
      * @param obj the current ViewContext or ServletRequest
-     * @throws IllegalArgumentException if the param is not a 
+     * @throws IllegalArgumentException if the param is not a
      *         ViewContext or ServletRequest
      */
     public void init(Object obj)

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewRenderTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewRenderTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewRenderTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewRenderTool.java Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003-2005 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-package org.apache.velocity.tools.view.tools;
-
 import org.apache.velocity.context.Context;
 import org.apache.velocity.tools.generic.RenderTool;
 import org.apache.velocity.tools.view.context.ViewContext;
@@ -37,7 +40,7 @@
  *      Output
  *      ------
  *      3
- * 
+ *
  * Example of recurse():
  *      Input
  *      -----
@@ -67,7 +70,7 @@
  *
  * <p>This tool is NOT meant to be used in either application or
  * session scopes of a servlet environment.</p>
- * 
+ *
  * @author <a href="mailto:nathan@esha.com">Nathan Bubna</a>
  * @version $Revision$ $Date$
  */
@@ -80,8 +83,8 @@
      */
     public ViewRenderTool()
     {}
-    
-    
+
+
     /**
      * Initializes this instance.
      *
@@ -100,10 +103,10 @@
 
     /**
      * <p>Evaluates a String containing VTL using the current context,
-     * and returns the result as a String.  If this fails, then 
+     * and returns the result as a String.  If this fails, then
      * <code>null</code> will be returned.  This evaluation is not
      * recursive.</p>
-     * 
+     *
      * @param vtl the code to be evaluated
      * @return the evaluated code as a String
      */
@@ -119,7 +122,7 @@
      * will continue to re-evaluate the output of the last
      * evaluation until an evaluation returns the same code
      * that was fed into it.</p>
-     * 
+     *
      * @param vtl the code to be evaluated
      * @return the evaluated code as a String
      */

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewTool.java
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewTool.java?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewTool.java (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/ViewTool.java Tue Nov 21 13:52:11 2006
@@ -1,28 +1,29 @@
+package org.apache.velocity.tools.view.tools;
+
 /*
- * Copyright 2003 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
  *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ *   http://www.apache.org/licenses/LICENSE-2.0
  *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
  */
 
-
-package org.apache.velocity.tools.view.tools;
-
-
 /**
  * Generic view tool interface to assist in tool management.
- * This interface provides the {@link #init(Object initData)} method 
+ * This interface provides the {@link #init(Object initData)} method
  * as a hook for ToolboxManager implementations to pass data in to
- * tools to initialize them.  See 
+ * tools to initialize them.  See
  * {@link org.apache.velocity.tools.view.ViewToolInfo} for more on this.
  *
  * @author <a href="mailto:nathan@esha.com">Nathan Bubna</a>
@@ -35,7 +36,7 @@
     /**
      * Initializes this instance using the given data
      *
-     * @param initData the initialization data 
+     * @param initData the initialization data
      */
     public void init(Object initData);
 

Modified: jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/package.html
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/package.html?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/package.html (original)
+++ jakarta/velocity/tools/trunk/src/java/org/apache/velocity/tools/view/tools/package.html Tue Nov 21 13:52:11 2006
@@ -1,3 +1,21 @@
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
+-->
 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
 <html>
 <head>

Modified: jakarta/velocity/tools/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jakarta/velocity/tools/trunk/xdocs/changes.xml?view=diff&rev=477914&r1=477913&r2=477914
==============================================================================
--- jakarta/velocity/tools/trunk/xdocs/changes.xml (original)
+++ jakarta/velocity/tools/trunk/xdocs/changes.xml Tue Nov 21 13:52:11 2006
@@ -1,21 +1,24 @@
 <?xml version="1.0"?>
-<!--
-  Copyright 2003-2005 The Apache Software Foundation.
-
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-     http://www.apache.org/licenses/LICENSE-2.0
 
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License.
-
-  $Id$
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one
+ or more contributor license agreements.  See the NOTICE file
+ distributed with this work for additional information
+ regarding copyright ownership.  The ASF licenses this file
+ to you under the Apache License, Version 2.0 (the
+ "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+
+   http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing,
+ software distributed under the License is distributed on an
+ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ KIND, either express or implied.  See the License for the
+ specific language governing permissions and limitations
+ under the License.
 -->
+
 <document>
   <properties>
     <title>Velocity Tools Changes</title>
@@ -40,7 +43,7 @@
       <li>Added VelocityStruts support for non-resource and session-scoped action messages (patch and help from Niall Pemberton. See Jira issues VELTOOLS-1 and VELTOOLS-51). (ndb)</li>
       <li>Factored generic parsing code out of ParameterParser into new ValueParser for parsing strings pulled from any Map. (ndb)</li>
       <li>Improved error handling/recovery in toolbox xml parsing by adding validation of tool info. (henning)</li>
-      <li>Added BrowserSnifferTool for identifying browsers and their features (contributed by Claude Brisson). This 
+      <li>Added BrowserSnifferTool for identifying browsers and their features (contributed by Claude Brisson). This
           depends on Java 1.4's regexp support for use. (ndb)</li>
       <li>Added EscapeTool for commons escaping needs (contributed by Shinobu Kawai). This requires commons-lang for use. (ndb)</li>
       <li>Added ListTool as utility for using arrays like Lists in templates (contributed by Shinobu Kawai). (ndb)</li>



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@velocity.apache.org
For additional commands, e-mail: dev-help@velocity.apache.org