You are viewing a plain text version of this content. The canonical link for it is here.
Posted to servletapi-dev@jakarta.apache.org by da...@apache.org on 2001/04/24 22:20:38 UTC

cvs commit: jakarta-servletapi-4/src/share/javax/servlet ServletContext.java ServletContextAttributeEvent.java ServletRequest.java UnavailableException.java

dannyc      01/04/24 13:20:38

  Modified:    src/share/javax/servlet ServletContext.java
                        ServletContextAttributeEvent.java
                        ServletRequest.java UnavailableException.java
  Log:
  javadoc changes/clarifications for Proposed Final Draft 2
  
  setAttribute("foo":, null) change
  use of UnavailableExcetpion with filters clarification
  Notification order for attribute events
  getParameterMap() value types
  
  Revision  Changes    Path
  1.3       +19 -9     jakarta-servletapi-4/src/share/javax/servlet/ServletContext.java
  
  Index: ServletContext.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContext.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServletContext.java	2001/03/16 23:45:28	1.2
  +++ ServletContext.java	2001/04/24 20:20:37	1.3
  @@ -108,17 +108,19 @@
        * <p>This method allows servlets to gain
        * access to the context for various parts of the server, and as
        * needed obtain {@link RequestDispatcher} objects from the context.
  -     * The given path must be absolute (beginning with "/") and is 
  -     * interpreted based on the server's document root. 
  +     * The given path must be begin with "/", is interpreted relative 
  +     * to the server's document root and is matched against the context roots of
  +     * other web applications hosted on this container.
        * 
        * <p>In a security conscious environment, the servlet container may
        * return <code>null</code> for a given URL.
        *       
  -     * @param uripath 	a <code>String</code> specifying the absolute URL of 
  -     *			a resource on the server
  -     *
  +     * @param uripath 	a <code>String</code> specifying the context path of
  +     *			another web application in the container.
        * @return		the <code>ServletContext</code> object that
  -     *			corresponds to the named URL
  +     *			corresponds to the named URL, or null if either
  +			none exists or the container wishes to restrict 
  +     * 			this access.
        *
        * @see 		RequestDispatcher
        *
  @@ -620,9 +622,13 @@
        *
        * Binds an object to a given attribute name in this servlet context. If
        * the name specified is already used for an attribute, this
  -     * method will remove the old attribute and bind the name
  -     * to the new attribute.
  -     *
  +     * method will replace the attribute with the new to the new attribute.
  +     * <p>If listeners are configured on the <code>ServletContext</code> the  
  +     * container notifies them accordingly.
  +     * <p>
  +     * If a null value is passed, the effect is the same as calling 
  +     * <code>removeAttribute()</code>.
  +     * 
        * <p>Attribute names should follow the same convention as package
        * names. The Java Servlet API specification reserves names
        * matching <code>java.*</code>, <code>javax.*</code>, and
  @@ -650,6 +656,10 @@
        * the servlet context. After removal, subsequent calls to
        * {@link #getAttribute} to retrieve the attribute's value
        * will return <code>null</code>.
  +
  +     * <p>If listeners are configured on the <code>ServletContext</code> the 
  +     * container notifies them accordingly.
  +
        *
        *
        * @param name	a <code>String</code> specifying the name 
  
  
  
  1.3       +1 -1      jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeEvent.java
  
  Index: ServletContextAttributeEvent.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/ServletContextAttributeEvent.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- ServletContextAttributeEvent.java	2001/03/16 23:45:29	1.2
  +++ ServletContextAttributeEvent.java	2001/04/24 20:20:37	1.3
  @@ -90,7 +90,7 @@
   	}
   	
   	/**
  -	* Returns the value of the attribute being added removed or replaced.
  +	* Returns the value of the attribute that has been added removed or replaced.
   	* If the attribute was added, this is the value of the attribute. If the attrubute was
   	* removed, this is the value of the removed attribute. If the attribute was replaced, this
   	* is the old value of the attribute.
  
  
  
  1.2       +7 -3      jakarta-servletapi-4/src/share/javax/servlet/ServletRequest.java
  
  Index: ServletRequest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/ServletRequest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ServletRequest.java	2001/01/09 03:24:17	1.1
  +++ ServletRequest.java	2001/04/24 20:20:38	1.2
  @@ -300,13 +300,17 @@
       public String[] getParameterValues(String name);
    
       /** Returns a java.util.Map of the parameters of this request.
  -    ** Request parameters
  +     * Request parameters
        * are extra information sent with the request.  For HTTP servlets,
        * parameters are contained in the query string or posted form data.
        *
  -     * @return an immutable java.util.Map containing parameter names as keys and parameter values as
  -     * map values.
  +     * @return an immutable java.util.Map containing parameter names as 
  +     * keys and parameter values as map values. The keys in the parameter
  +     * map are of type String. The values in the parameter map are of type
  +     * String array.
  +     *
        */
  +
       public Map getParameterMap();
       
       
  
  
  
  1.2       +9 -9      jakarta-servletapi-4/src/share/javax/servlet/UnavailableException.java
  
  Index: UnavailableException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-servletapi-4/src/share/javax/servlet/UnavailableException.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- UnavailableException.java	2001/01/09 03:24:17	1.1
  +++ UnavailableException.java	2001/04/24 20:20:38	1.2
  @@ -62,17 +62,17 @@
   
   
   /**
  - * Defines an exception that a servlet throws to indicate
  + * Defines an exception that a servlet or filter throws to indicate
    * that it is permanently or temporarily unavailable. 
    *
  - * <p>When a servlet is permanently unavailable, something is wrong
  - * with the servlet, and it cannot handle
  - * requests until some action is taken. For example, the servlet
  - * might be configured incorrectly, or its state may be corrupted.
  - * A servlet should log both the error and the corrective action
  + * <p>When a servlet or filter is permanently unavailable, something is wrong
  + * with the it, and it cannot handle
  + * requests until some action is taken. For example, a servlet
  + * might be configured incorrectly, or a filter's state may be corrupted.
  + * The component should log both the error and the corrective action
    * that is needed.
    *
  - * <p>A servlet is temporarily unavailable if it cannot handle
  + * <p>A servlet or filter is temporarily unavailable if it cannot handle
    * requests momentarily due to some system-wide problem. For example,
    * a third-tier server might not be accessible, or there may be 
    * insufficient memory or disk storage to handle requests. A system
  @@ -81,8 +81,8 @@
    * <p>Servlet containers can safely treat both types of unavailable
    * exceptions in the same way. However, treating temporary unavailability
    * effectively makes the servlet container more robust. Specifically,
  - * the servlet container might block requests to the servlet for a period
  - * of time suggested by the servlet, rather than rejecting them until
  + * the servlet container might block requests to the servlet or filter for a period
  + * of time suggested by the exception, rather than rejecting them until
    * the servlet container restarts.
    *
    *