nbubna      2003/03/22 12:33:10

  Modified:    src/java/org/apache/velocity/tools/generic package.html
               src/java/org/apache/velocity/tools/struts ErrorsTool.java
                        FormTool.java MessageTool.java StrutsLinkTool.java
                        StrutsUtils.java package.html
               src/java/org/apache/velocity/tools/view DataInfo.java
                        ViewToolInfo.java XMLToolboxManager.java
               src/java/org/apache/velocity/tools/view/context
                        ChainedContext.java
               src/java/org/apache/velocity/tools/view/servlet
                        ServletLogger.java ServletToolInfo.java
                        ServletToolboxManager.java VelocityViewServlet.java
                        WebappLoader.java package.html
               src/java/org/apache/velocity/tools/view/tools LinkTool.java
                        ParameterParser.java package.html
  Added:       src/java/org/apache/velocity/tools/view package.html
  Log:
  misc. repair and improvements to javadocs
  
  Revision  Changes    Path
  1.2       +3 -2      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/generic/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      5 Mar 2003 06:13:02 -0000       1.1
  +++ package.html      22 Mar 2003 20:33:08 -0000      1.2
  @@ -9,8 +9,9 @@
   </head>
   <body bgcolor="white">
   
  -Contains a collection of reusable, general-purpose Velocity view tools. Where 
  -applicable tools are optimized to be used in conjunction with a toolbox manager.
  +Contains a collection of reusable, general-purpose "tools" for Velocity.
  +These tools are independent of the VelocityView classes and may be used
  +in any context.
   
   <!--
   ##### THIS IS THE TEMPLATE FOR THE PACKAGE DOC COMMENTS. #####
  
  
  
  1.2       +3 -4      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java
  
  Index: ErrorsTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/ErrorsTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ErrorsTool.java   5 Mar 2003 06:13:02 -0000       1.1
  +++ ErrorsTool.java   22 Mar 2003 20:33:09 -0000      1.2
  @@ -79,13 +79,12 @@
    * context information.</p>
    *
    * <p>This class is not thread-safe by design. A new instance is needed for
  - * the processing of every template request.</p>
  + * the processing of every template request.  This means this tool should
  + * only be used in the request scope, not application or session scopes.</p>
    *
  -
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    *
    * @version $Id$
  - * 
    */
   public class ErrorsTool implements ViewTool
   {
  
  
  
  1.2       +3 -3      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/FormTool.java
  
  Index: FormTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/FormTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- FormTool.java     5 Mar 2003 06:13:02 -0000       1.1
  +++ FormTool.java     22 Mar 2003 20:33:09 -0000      1.2
  @@ -74,12 +74,12 @@
    * context information.</p>
    *
    * <p>This class is not thread-safe by design. A new instance is needed for
  - * the processing of every template request.</p>
  + * the processing of every template request.  This means this tool should
  + * only be used in the request scope, not application or session scopes.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    *
    * @version $Id$
  - * 
    */
   public class FormTool implements ViewTool
   {
  
  
  
  1.2       +4 -4      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/MessageTool.java
  
  Index: MessageTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/MessageTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- MessageTool.java  5 Mar 2003 06:13:02 -0000       1.1
  +++ MessageTool.java  22 Mar 2003 20:33:09 -0000      1.2
  @@ -70,7 +70,7 @@
   
   
   /** 
  - * View tool that provides methods to render Struts message resources.</p>
  + * <p>View tool that provides methods to render Struts message resources.</p>
    *
    * <p>This class is equipped to be used with a toolbox manager, for example
    * the ServletToolboxManager included with VelServlet. This class implements
  @@ -78,12 +78,12 @@
    * required context information.</p>
    *
    * <p>This class is not thread-safe by design. A new instance is needed for
  - * the processing of every template request.</p>
  + * the processing of every template request.  This means this tool should
  + * only be used in the request scope, not application or session scopes.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    *
    * @version $Id$
  - * 
    */
   public class MessageTool implements ViewTool
   {
  
  
  
  1.2       +3 -3      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsLinkTool.java
  
  Index: StrutsLinkTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsLinkTool.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StrutsLinkTool.java       5 Mar 2003 06:13:02 -0000       1.1
  +++ StrutsLinkTool.java       22 Mar 2003 20:33:09 -0000      1.2
  @@ -79,13 +79,13 @@
    * context information.</p>
    *
    * <p>This class is not thread-safe by design. A new instance is needed for
  - * the processing of every template request.</p>
  + * the processing of every template request.  This means this tool should
  + * only be used in the request scope, not application or session scopes.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    *
    * @version $Id$
  - * 
    */
   public class StrutsLinkTool extends LinkTool
   {
  
  
  
  1.2       +4 -2      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java
  
  Index: StrutsUtils.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/StrutsUtils.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- StrutsUtils.java  5 Mar 2003 06:13:02 -0000       1.1
  +++ StrutsUtils.java  22 Mar 2003 20:33:09 -0000      1.2
  @@ -85,7 +85,9 @@
    * and reuse fostered.</p>
    *
    * <p>It is the aim, that sooner or later the functionality in
  - * this class is integrated into Struts itself.</p>
  + * this class is integrated into Struts itself.  Ideally, they will
  + * yank the JSP-centric code (PageContext, etc.) out of their RequestUtils 
  + * to allow other view layers to leverage that code.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>, based
    * on code by <a href="mailto:[EMAIL PROTECTED]">Ted Husted</a>
  
  
  
  1.2       +1 -1      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/struts/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      5 Mar 2003 06:13:02 -0000       1.1
  +++ package.html      22 Mar 2003 20:33:09 -0000      1.2
  @@ -10,7 +10,7 @@
   <body bgcolor="white">
   
   
  -Provides four view tools that integrate Velocity with the Jakarta
  +Provides view tools to integrate Velocity with the Jakarta
   Struts framework.
   
   <!--
  
  
  
  1.2       +24 -3     
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/DataInfo.java
  
  Index: DataInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/DataInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DataInfo.java     5 Mar 2003 06:13:03 -0000       1.1
  +++ DataInfo.java     22 Mar 2003 20:33:09 -0000      1.2
  @@ -57,8 +57,29 @@
   
   
   /**
  - * ToolInfo implementation to handle "primitive" data types.
  - * It currently supports String, Number, and Boolean data.
  + * <p>ToolInfo implementation to handle "primitive" data types.
  + * It currently supports String, Number, and Boolean data.</p>
  + *
  + * <p>An example of data elements specified in your toolbox.xml
  + * might be:
  + * <pre>
  + *  &lt;data type="string"&gt;
  + *    &lt;key&gt;app_name&lt;/key&gt;
  + *    &lt;value&gt;FooWeb Deluxe&lt;/value&gt;
  + *  &lt;/data&gt;
  + *  &lt;data type="number"&gt;
  + *    &lt;key&gt;app_version&lt;/key&gt;
  + *    &lt;value&gt;4.2&lt;/value&gt;
  + *  &lt;/data&gt;
  + *  &lt;data type="boolean"&gt;
  + *    &lt;key&gt;debug&lt;/key&gt;
  + *    &lt;value&gt;true&lt;/value&gt;
  + *  &lt;/data&gt;
  + *  &lt;data type="number"&gt;
  + *    &lt;key&gt;screen_width&lt;/key&gt;
  + *    &lt;value&gt;400&lt;/value&gt;
  + *  &lt;/data&gt;
  + * </pre></p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    *
  
  
  
  1.2       +2 -2      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/ViewToolInfo.java
  
  Index: ViewToolInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/ViewToolInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ViewToolInfo.java 5 Mar 2003 06:13:03 -0000       1.1
  +++ ViewToolInfo.java 22 Mar 2003 20:33:09 -0000      1.2
  @@ -62,7 +62,7 @@
   /**
    * ToolInfo implementation for view tools. New instances
    * are returned for every call to getInstance(obj), and tools
  - * that implement (@link ViewTool} are initialized with the
  + * that implement [EMAIL PROTECTED] ViewTool} are initialized with the
    * given object before being returned.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
  
  
  
  1.2       +3 -3      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/XMLToolboxManager.java
  
  Index: XMLToolboxManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/XMLToolboxManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XMLToolboxManager.java    5 Mar 2003 06:13:03 -0000       1.1
  +++ XMLToolboxManager.java    22 Mar 2003 20:33:09 -0000      1.2
  @@ -181,9 +181,9 @@
   
   
       /**
  -     * Reads an XML document from an [EMAIL PROTECTED] InputStream}
  +     * <p>Reads an XML document from an [EMAIL PROTECTED] InputStream}
        * using <a href="http://dom4j.org";>dom4j</a> and
  -     * sets up the toolbox from that.
  +     * sets up the toolbox from that.</p>
        *
        * The DTD for toolbox schema is:
        * <pre>
  
  
  
  1.1                  
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/package.html
  
  Index: package.html
  ===================================================================
  <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  <html>
  <head>
  <!--
  
    These are Javadoc package comments.
    
  -->
  </head>
  <body bgcolor="white">
  
  Contains base interfaces and classes for toolbox management.
  <br><br>
  This is the root package of the VelocityView code. Classes
  in this package and it's subpackages are meant to provide
  support for using Velocity for the view layer of MVC applications
  (with an emphasis on toolbox support and support for servlet based
  applications).
  
  <!--
  ##### 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.... 
  -->
  
  <h2>Package Specification</h2>
  
  <!--
  ##### FILL IN ANY SPECS NEEDED BY JAVA COMPATIBILITY KIT #####
  <ul>
    <li><a href="">##### REFER TO ANY FRAMEMAKER SPECIFICATION HERE #####</a>
  </ul>
  -->
  
  <h2>Related Documentation</h2>
  
  <!--
  For overviews, tutorials, examples, guides, and tool documentation, please see:
  <ul>
    <li><a href="">##### REFER TO NON-SPEC DOCUMENTATION HERE #####</a>
  </ul>
  -->
  
  <!-- Put @see and @since tags down here. -->
  
  </body>
  </html>
  
  
  
  1.2       +2 -2      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/context/ChainedContext.java
  
  Index: ChainedContext.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/context/ChainedContext.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ChainedContext.java       5 Mar 2003 06:13:03 -0000       1.1
  +++ ChainedContext.java       22 Mar 2003 20:33:09 -0000      1.2
  @@ -91,7 +91,7 @@
    * <p>The purpose of this class is to make it easy for web designer to work 
    * with Java servlet based web applications. They do not need to be concerned 
    * with the concepts of request, session or application attributes and the 
  - * live time of objects in these scopes.</p>
  + * lifetime of objects in these scopes.</p>
    *  
    * <p>Note that the put() method always puts objects into the local hashtable.
    * </p>
  
  
  
  1.3       +2 -1      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletLogger.java
  
  Index: ServletLogger.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletLogger.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServletLogger.java        20 Mar 2003 06:07:27 -0000      1.2
  +++ ServletLogger.java        22 Mar 2003 20:33:09 -0000      1.3
  @@ -63,7 +63,8 @@
   
   
   /**
  - *  Simple wrapper for the servlet log
  + * Simple wrapper for the servlet log.  This has Velocity log
  + * messages to ServletContext.log(String).
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    */
  
  
  
  1.2       +23 -3     
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletToolInfo.java
  
  Index: ServletToolInfo.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletToolInfo.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletToolInfo.java      5 Mar 2003 06:13:03 -0000       1.1
  +++ ServletToolInfo.java      22 Mar 2003 20:33:09 -0000      1.2
  @@ -60,8 +60,28 @@
   
   
   /**
  - * ToolInfo implementation that holds scope information for tools
  - * used in a servlet environment.
  + * <p>ToolInfo implementation that holds scope information for tools
  + * used in a servlet environment.  The ServletToolboxManager uses
  + * this to allow tool definitions to specify the scope/lifecycle
  + * of individual view tools.</p>
  + *
  + * <p>Example of toolbox.xml definitions for servlet tools:<pre>
  + *  &lt;tool&gt;
  + *    &lt;key&gt;link&lt;/key&gt;
  + *    &lt;scope&gt;request&lt;/scope&gt;
  + *    &lt;class&gt;org.apache.velocity.tools.struts.StrutsLinkTool&lt;/class&gt;
  + *  &lt;/tool&gt;
  + *  &lt;tool&gt;
  + *    &lt;key&gt;math&lt;/key&gt;
  + *    &lt;scope&gt;application&lt;/scope&gt;
  + *    &lt;class&gt;org.apache.velocity.tools.generic.MathTool&lt;/class&gt;
  + *  &lt;/tool&gt;
  + *  &lt;tool&gt;
  + *    &lt;key&gt;user&lt;/key&gt;
  + *    &lt;scope&gt;session&lt;/scope&gt;
  + *    &lt;class&gt;com.mycompany.tools.MyUserTool&lt;/class&gt;
  + *  &lt;/tool&gt;
  + *  </pre></p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    *
  
  
  
  1.2       +13 -11    
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletToolboxManager.java
  
  Index: ServletToolboxManager.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/ServletToolboxManager.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletToolboxManager.java        5 Mar 2003 06:13:03 -0000       1.1
  +++ ServletToolboxManager.java        22 Mar 2003 20:33:09 -0000      1.2
  @@ -114,18 +114,18 @@
    *      &lt;scope&gt;application&lt;/scope&gt;
    *      &lt;class&gt;org.apache.velocity.tools.tools.MathTool&lt;/class&gt;
    *   &lt;/tool&gt;
  - *   &lt;data type="Number"&gt;
  + *   &lt;data type="number"&gt;
    *      &lt;key&gt;luckynumber&lt;/key&gt;
    *      &lt;value&gt;1.37&lt;/class&gt;
    *   &lt;/data&gt;
  - *   &lt;data type="String"&gt;
  + *   &lt;data type="string"&gt;
    *      &lt;key&gt;greeting&lt;/key&gt;
    *      &lt;value&gt;Hello World!&lt;/class&gt;
    *   &lt;/data&gt;
    * &lt;/toolbox&gt;    
    * </pre>
    * <p>The recommended location for the configuration file is the WEB-INF directory 
of the
  - * web application. 
  + * web application.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabriel Sidler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
  @@ -245,18 +245,19 @@
       // --------------------------------------------------- Methods ------------
   
       /**
  -     * Sets whether or not to create a new session when none exists for the
  +     * <p>Sets whether or not to create a new session when none exists for the
        * current request and session-scoped tools have been defined for this
  -     * toolbox.
  +     * toolbox.</p>
        *
  -     * If true, then a call to [EMAIL PROTECTED] getToolboxContext} will 
  +     * <p>If true, then a call to [EMAIL PROTECTED] #getToolboxContext(Object)} 
will 
        * create a new session if none currently exists for this request and
  -     * the toolbox has one or more session-scoped tools designed.
  +     * the toolbox has one or more session-scoped tools designed.</p>
        *
  -     * If false, then a call to [EMAIL PROTECTED] getToolboxContext} will never
  +     * <p>If false, then a call to getToolboxContext(Object) will never
        * create a new session for the current request.
        * This effectively means that no session-scoped tools will be added to 
        * the ToolboxContext for a request that does not have a session object.
  +     * </p>
        *
        * The default value is true.
        */
  @@ -312,7 +313,7 @@
       /**
        * Reads the value for create-session.
        *
  -     * @see setCreateSession(boolean)
  +     * @see #setCreateSession(boolean)
        */
       protected boolean readCreateSession(Element e) throws Exception
       {
  @@ -360,7 +361,7 @@
   
       /**
        * Overrides XMLToolboxManager to separate tools by scope.
  -     * For this to work, we obviously override getToolboxContext as well.
  +     * For this to work, we obviously override getToolboxContext(Object) as well.
        */
       public void addTool(ToolInfo info)
       {
  @@ -410,6 +411,7 @@
        * map in the session attributes.
        * Request scope tools are initialized on every request.
        * 
  +     * @param initData the [EMAIL PROTECTED] ViewContext} for the current servlet 
request
        */
       public ToolboxContext getToolboxContext(Object initData)
       {
  
  
  
  1.7       +19 -25    
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java
  
  Index: VelocityViewServlet.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/VelocityViewServlet.java,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- VelocityViewServlet.java  20 Mar 2003 06:07:27 -0000      1.6
  +++ VelocityViewServlet.java  22 Mar 2003 20:33:09 -0000      1.7
  @@ -105,9 +105,9 @@
    * </ul>
    *
    * <p>VelocityViewServlet supports the following configuration parameters
  - * in webl.xml:</p>
  + * in web.xml:</p>
    * <dl>
  - *   <dt>toolbox</dt>
  + *   <dt>org.apache.velocity.toolbox</dt>
    *   <dd>Path and name of the toolbox configuration file. The path must be
    *     relative to the web application root directory. If this parameter is
    *     not found, no toolbox is instantiated.</dd>
  @@ -117,33 +117,26 @@
    *     is not present, Velocity is initialized with default settings.</dd>
    * </dl>
    * 
  - * <p>There are methods you can override to access, alter or control
  + * <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 :
    * <ul>
  - * <li> loadConfiguration() : for setting up the Velocity runtime
  - * <li> createContext() : for creating and loading the Context
  - * <li> setContentType() : for changing the content type on a request
  - *                         by request basis
  - * <li> handleRequest() : you <b>must</b> implement this 
  - * <li> mergeTemplate()  : the template rendering process
  - * <li> requestCleanup() : post rendering resource or other cleanup
  - * <li> error() : error handling
  + * <li> [EMAIL PROTECTED] #loadConfiguration} : <br>for loading Velocity properties 
and
  + *                                     configuring the Velocity runtime
  + * <li> [EMAIL PROTECTED] #setContentType} : <br>for changing the content type on a 
request
  + *                                  by request basis
  + * <li> [EMAIL PROTECTED] #requestCleanup} : <br>post rendering resource or other 
cleanup
  + * <li> [EMAIL PROTECTED] #error} : <br>error handling
    * </ul>
  - * <br>
  - * If you put a contentType object into the context within either your
  - * serlvet or within your template, then that will be used to override
  - * the default content type specified in the properties file.
  - *
  - * "contentType" - The value for the Content-Type: header
  + * </p>
    *
    * @author Dave Bryson
    * @author <a href="mailto:[EMAIL PROTECTED]">Jon S. Stevens</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
  - * @author <a href="[EMAIL PROTECTED]">Kent Johnson</a>
  - * @author <a href="[EMAIL PROTECTED]">Daniel Rall</a>
  - * @author <a href="[EMAIL PROTECTED]">Nathan Bubna</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Kent Johnson</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Daniel Rall</a>
  + * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    *
    * @version $Id$
    */
  @@ -162,26 +155,27 @@
       public static final String DEFAULT_CONTENT_TYPE = "text/html";
     
       /**
  -     * Encoding for the output stream
  +     * Default encoding for the output stream
        */
       public static final String DEFAULT_OUTPUT_ENCODING = "ISO-8859-1";
   
       /**
  -     * Key used to access the ServletContext in the Velocity
  +     * Key used to access the ServletContext in 
  +     * the Velocity application attributes.
        */
       public static final String SERVLET_CONTEXT_KEY = ServletContext.class.getName();
   
   
       /**
        * Key used to access the toolbox configuration file path from the
  -     * Servlet or webapp init parameters.
  +     * Servlet or webapp init parameters ("org.apache.velocity.toolbox").
        */
       protected static final String TOOLBOX_KEY = 
           "org.apache.velocity.toolbox";
   
       /**
        * This is the string that is looked for when getInitParameter is
  -     * called (<code>org.apache.velocity.properties</code>).
  +     * called ("org.apache.velocity.properties").
        */
       protected static final String INIT_PROPS_KEY =
           "org.apache.velocity.properties";
  
  
  
  1.4       +5 -2      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java
  
  Index: WebappLoader.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/WebappLoader.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- WebappLoader.java 20 Mar 2003 06:07:27 -0000      1.3
  +++ WebappLoader.java 22 Mar 2003 20:33:09 -0000      1.4
  @@ -66,7 +66,10 @@
   import org.apache.velocity.runtime.resource.loader.ResourceLoader;
   
   /**
  - *  
  + * Resource loader that uses the ServletContext of a webapp to
  + * load Velocity templates.  (it's much easier to use with servlets than
  + * the standard FileResourceLoader.)
  + *
    * @author <a href="mailto:[EMAIL PROTECTED]">Geir Magnusson Jr.</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    * @version $Id$
  
  
  
  1.2       +2 -3      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/servlet/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      5 Mar 2003 06:13:03 -0000       1.1
  +++ package.html      22 Mar 2003 20:33:09 -0000      1.2
  @@ -9,9 +9,8 @@
   </head>
   <body bgcolor="white">
   
  -Provides VelocityViewServlet et. al., a standalone Velocity servlet for template 
  -rendering in web applications, and supporting classes. All classes
  -in this package are specific to the Java Servlet environment.
  +Provides classes to support using Velocity in a servlet environment.
  +(includes servlets, resource loader, logger, and a toolbox manager)
   
   <!--
   ##### THIS IS THE TEMPLATE FOR THE PACKAGE DOC COMMENTS. #####
  
  
  
  1.3       +8 -6      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/LinkTool.java
  
  Index: LinkTool.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/LinkTool.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- LinkTool.java     20 Mar 2003 05:56:42 -0000      1.2
  +++ LinkTool.java     22 Mar 2003 20:33:09 -0000      1.3
  @@ -69,7 +69,7 @@
   
   
   /**
  - * <p>View tool to work with URI links</p> 
  + * <p>View tool to make building URIs pleasant and fun! :)</p>
    * 
    * <p>This class is equipped to be used with a toolbox manager, for example
    * the ServletToolboxManager included with VelocityViewServlet. This class 
  @@ -77,20 +77,22 @@
    * required context information.</p>
    *
    * <p>This class is not thread-safe by design. A new instance is needed for
  - * the processing of every template request.</p>
  + * the processing of every template request.  This means this tool should
  + * only be used in the request scope, not application or session scopes.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Gabe Sidler</a>
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    *
    * @version $Id$
  - * 
    */
   public class LinkTool implements ViewTool, Cloneable
   {
   
   
  +    /** Standard HTML delimiter for query data ('&') */ 
       public static final String HTML_QUERY_DELIMITER = "&";
   
  +    /** XHTML delimiter for query data ('&amp;amp;') */ 
       public static final String XHTML_QUERY_DELIMITER = "&amp;";
   
   
  @@ -135,7 +137,7 @@
        * <p>Subclasses may easily override the init() method to set this
        *    appropriately and then call super.init()</p>
        *
  -     * @param useXhtml if true, the XHTML query data delimiter ("&amp;")
  +     * @param useXhtml if true, the XHTML query data delimiter ('&amp;amp;')
        *        will be used.  if false, then '&' will be used.
        * @see <a href="http://www.w3.org/TR/xhtml1/#C_12";>Using Ampersands in 
Attribute Values (and Elsewhere)</a>
        */
  @@ -260,7 +262,7 @@
        * @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
  +     * @return a new instance of LinkTool with the specified URI
        */
       public LinkTool setRelative(String uri)
       {
  
  
  
  1.4       +10 -9     
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java
  
  Index: ParameterParser.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/ParameterParser.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ParameterParser.java      20 Mar 2003 05:56:42 -0000      1.3
  +++ ParameterParser.java      22 Mar 2003 20:33:09 -0000      1.4
  @@ -63,14 +63,15 @@
   
   
   /**
  - * Utility class for easy parsing of [EMAIL PROTECTED] ServletRequest} parameters
  - * <br>
  - * This class now implements the ViewTool interface to allow it
  - * to be used as a request based tool.
  - * <br>
  - * It should be noted that this class is not thread-safe.  As it 
  + * <p>Utility class for easy parsing of [EMAIL PROTECTED] ServletRequest} 
parameters.</p>
  + * 
  + * <p>This class implements the ViewTool interface to allow it
  + * to be used as a request scoped tool.</p>
  + * 
  + * <p>It should be noted that this class is not thread-safe.  As it 
    * is wholly dependent upon the current ServletRequest, therefore each
  - * ServletRequest should have its own instance.
  + * ServletRequest should have its own instance.  This tool should not
  + * be used in the session or application scopes of your webapp.</p>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]">Nathan Bubna</a>
    * @version $Revision$ $Date$
  @@ -90,7 +91,7 @@
   
   
       /**
  -     * Constructs a new instance using the specified request
  +     * Constructs a new instance using the specified request.
        *
        * @param the [EMAIL PROTECTED] ServletRequest} to be parsed
        */
  
  
  
  1.2       +1 -3      
jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/package.html
  
  Index: package.html
  ===================================================================
  RCS file: 
/home/cvs/jakarta-velocity-tools/src/java/org/apache/velocity/tools/view/tools/package.html,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- package.html      5 Mar 2003 06:13:03 -0000       1.1
  +++ package.html      22 Mar 2003 20:33:09 -0000      1.2
  @@ -10,9 +10,7 @@
   </head>
   <body bgcolor="white">
   
  -Provides interfaces and abstract classes supporting the construction of
  -automatically managed view tools, as well as several servlet-tied,
  -but non-Struts view tools.
  +Provides the ViewTool interface and several useful implementing classes.
   
   
   <!--
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to