Hi,
The attached file is to update the Servlet 2.4 API.
Changes are:
* Fix typos
jsr154/src/share/javax/servlet/Filter.java
jsr154/src/share/javax/servlet/FilterConfig.java
jsr154/src/share/javax/servlet/ServletConfig.java
jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java
jsr154/src/share/javax/servlet/ServletContextListener.java
jsr154/src/share/javax/servlet/ServletOutputStream.java
jsr154/src/share/javax/servlet/UnavailableException.java
jsr154/src/share/javax/servlet/http/Cookie.java
jsr154/src/share/javax/servlet/http/HttpServlet.java
jsr154/src/share/javax/servlet/http/HttpServletRequest.java
jsr154/src/share/javax/servlet/http/HttpServletResponse.java
jsr154/src/share/javax/servlet/http/HttpSession.java
jsr154/src/share/javax/servlet/http/HttpSessionListener.java
* Add the condition to return null in "Returns" in getRequestDispatcher
jsr154/src/share/javax/servlet/ServletContext.java
jsr154/src/share/javax/servlet/ServletRequest.java
* Clarification of internationalization: making clear the
relationship among setLocale(), setContentType, and
setCharacterEncoding
jsr154/src/share/javax/servlet/ServletResponse.java
--------------
Yutaka Yoshida
Java/XML Software Group
Sun Microsystems Inc.
Index: jsr154/src/share/javax/servlet/Filter.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/Filter.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 Filter.java
--- jsr154/src/share/javax/servlet/Filter.java 13 Aug 2002 16:21:42 -0000 1.1.1.1
+++ jsr154/src/share/javax/servlet/Filter.java 30 Jul 2003 18:01:54 -0000
@@ -63,7 +63,7 @@
import java.io.IOException;
/**
- * A filter is an object than perform filtering tasks on either the request to
a resource (a servlet or static content), or on the response from a resource, or both.
+ * A filter is an object that performs filtering tasks on either the request to
a resource (a servlet or static content), or on the response from a resource, or both.
* <br><br>
* Filters perform filtering in the <code>doFilter</code> method. Every Filter
has access to
** a FilterConfig object from which it can obtain its initialization
parameters, a
@@ -114,7 +114,7 @@
* filter content or headers for output filtering <br>
* 4. a) <strong>Either</strong> invoke the next entity in the chain using the
FilterChain object (<code>chain.doFilter()</code>), <br>
** 4. b) <strong>or</strong> not pass on the request/response pair to the next
entity in the filter chain to block the request processing<br>
- ** 5. Directly set headers on the response after invokation of the next entity
in ther filter chain.
+ ** 5. Directly set headers on the response after invocation of the next entity
in ther filter chain.
**/
public void doFilter ( ServletRequest request, ServletResponse response,
FilterChain chain ) throws IOException, ServletException;
Index: jsr154/src/share/javax/servlet/FilterConfig.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/FilterConfig.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 FilterConfig.java
--- jsr154/src/share/javax/servlet/FilterConfig.java 13 Aug 2002 16:21:42 -0000
1.1.1.1
+++ jsr154/src/share/javax/servlet/FilterConfig.java 30 Jul 2003 18:01:54 -0000
@@ -68,7 +68,7 @@
/**
*
* A filter configuration object used by a servlet container
- * used to pass information to a filter during initialization.
+ * to pass information to a filter during initialization.
* @see Filter
* @since Servlet 2.3
*
@@ -116,13 +116,13 @@
/**
- * Returns the names of the servlet's initialization parameters
+ * Returns the names of the filter's initialization parameters
* as an <code>Enumeration</code> of <code>String</code> objects,
- * or an empty <code>Enumeration</code> if the servlet has
+ * or an empty <code>Enumeration</code> if the filter has
* no initialization parameters.
*
* @return an <code>Enumeration</code> of <code>String</code>
- * objects containing the names of the servlet's
+ * objects containing the names of the filter's
* initialization parameters
*
*
Index: jsr154/src/share/javax/servlet/ServletConfig.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletConfig.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ServletConfig.java
--- jsr154/src/share/javax/servlet/ServletConfig.java 13 Aug 2002 16:21:43 -0000
1.1.1.1
+++ jsr154/src/share/javax/servlet/ServletConfig.java 30 Jul 2003 18:01:54 -0000
@@ -67,7 +67,7 @@
/**
*
* A servlet configuration object used by a servlet container
- * used to pass information to a servlet during initialization.
+ * to pass information to a servlet during initialization.
*
*/
Index: jsr154/src/share/javax/servlet/ServletContext.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletContext.java,v
retrieving revision 1.3
diff -u -r1.3 ServletContext.java
--- jsr154/src/share/javax/servlet/ServletContext.java 11 Apr 2003 15:02:40 -0000
1.3
+++ jsr154/src/share/javax/servlet/ServletContext.java 30 Jul 2003 18:01:54 -0000
@@ -312,7 +312,9 @@
*
* @return a <code>RequestDispatcher</code> object
* that acts as a wrapper for the resource
- * at the specified path
+ * at the specified path, or <code>null</code> if
+ * the <code>ServletContext</code> cannot return
+ * a <code>RequestDispatcher</code>
*
* @see RequestDispatcher
* @see ServletContext#getContext
@@ -340,7 +342,9 @@
* of a servlet to wrap
*
* @return a <code>RequestDispatcher</code> object
- * that acts as a wrapper for the named servlet
+ * that acts as a wrapper for the named servlet,
+ * or <code>null</code> if the <code>ServletContext</code>
+ * cannot return a <code>RequestDispatcher</code>
*
* @see RequestDispatcher
* @see ServletContext#getContext
Index: jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ServletContextAttributeEvent.java
--- jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java 13 Aug 2002
16:21:43 -0000 1.1.1.1
+++ jsr154/src/share/javax/servlet/ServletContextAttributeEvent.java 30 Jul 2003
18:01:54 -0000
@@ -90,7 +90,7 @@
}
/**
- * Returns the value of the attribute that has been 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.
Index: jsr154/src/share/javax/servlet/ServletContextListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletContextListener.java,v
retrieving revision 1.2
diff -u -r1.2 ServletContextListener.java
--- jsr154/src/share/javax/servlet/ServletContextListener.java 5 Mar 2003 19:42:48
-0000 1.2
+++ jsr154/src/share/javax/servlet/ServletContextListener.java 30 Jul 2003 18:01:54
-0000
@@ -81,7 +81,7 @@
public void contextInitialized ( ServletContextEvent sce );
/** Notification that the servlet context is about to be shut down. All
servlets
- have been dstroy()ed before any ServletContextListeners are notified of context
+ have been destroy()ed before any ServletContextListeners are notified of
context
destruction. */
public void contextDestroyed ( ServletContextEvent sce );
}
Index: jsr154/src/share/javax/servlet/ServletOutputStream.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletOutputStream.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 ServletOutputStream.java
--- jsr154/src/share/javax/servlet/ServletOutputStream.java 13 Aug 2002 16:21:43
-0000 1.1.1.1
+++ jsr154/src/share/javax/servlet/ServletOutputStream.java 30 Jul 2003 18:01:54
-0000
@@ -107,7 +107,7 @@
* character at the end.
*
*
- * @param s the <code>String</code to send to the client
+ * @param s the <code>String</code> to send to the client
*
* @exception IOException if an input or output exception occurred
*
Index: jsr154/src/share/javax/servlet/ServletRequest.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletRequest.java,v
retrieving revision 1.5
diff -u -r1.5 ServletRequest.java
--- jsr154/src/share/javax/servlet/ServletRequest.java 11 Apr 2003 15:02:40 -0000
1.5
+++ jsr154/src/share/javax/servlet/ServletRequest.java 30 Jul 2003 18:01:54 -0000
@@ -567,7 +567,9 @@
*
* @return a <code>RequestDispatcher</code> object
* that acts as a wrapper for the resource
- * at the specified path
+ * at the specified path, or <code>null</code>
+ * if the servlet container cannot return a
+ * <code>RequestDispatcher</code>
*
* @see RequestDispatcher
* @see ServletContext#getRequestDispatcher
Index: jsr154/src/share/javax/servlet/ServletResponse.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/ServletResponse.java,v
retrieving revision 1.3
diff -u -r1.3 ServletResponse.java
--- jsr154/src/share/javax/servlet/ServletResponse.java 22 Mar 2003 15:22:00 -0000
1.3
+++ jsr154/src/share/javax/servlet/ServletResponse.java 30 Jul 2003 18:01:54 -0000
@@ -235,9 +235,19 @@
* is equivalent with calling
* <code>setContentType</code> with the <code>String</code> of
* <code>text/html; charset=UTF-8</code>.
- * <p>This method has no effect if it is called after
+ * <p>This method can be called repeatedly to change the character
+ * encoding.
+ * This method has no effect if it is called after
* <code>getWriter</code> has been
* called or after the response has been committed.
+ * <p>Containers must communicate the character encoding used for
+ * the servlet response's writer to the client if the protocol
+ * provides a way for doing so. In the case of HTTP, the character
+ * encoding is communicated as part of the <code>Content-Type</code>
+ * header for text media types. Note that the character encoding
+ * cannot be communicated via HTTP headers if the servlet does not
+ * specify a content type; however, it is still used to encode text
+ * written via the servlet response's writer.
*
* @param charset a String specifying only the character set
* defined by IANA Character Sets
@@ -278,10 +288,16 @@
* The response's character encoding is only set from the given
* content type if this method is called before <code>getWriter</code>
* is called.
- * <p>This method has no effect if called after the response
+ * <p>This method may be called repeatedly to change content type and
+ * character encoding.
+ * This method has no effect if called after the response
* has been committed. It does not set the response's character
* encoding if it is called after <code>getWriter</code>
* has been called or after the response has been committed.
+ * <p>Containers must communicate the content type and the character
+ * encoding used for the servlet response's writer to the client if
+ * the protocol provides a way for doing so. In the case of HTTP,
+ * the <code>Content-Type</code> header is used.
*
* @param type a <code>String</code> specifying the MIME
* type of the content
@@ -418,26 +434,34 @@
/**
- * Sets the locale of the response, setting the
- * <code>Content-Language</code> header,
- * if the response has not been committed yet.
- * It also sets the response's character encoding appropriately
- * for the locale, if the character encoding has not been
- * explicitly set using [EMAIL PROTECTED] #setContentType} or
+ * Sets the locale of the response, if the response has not been
+ * committed yet. It also sets the response's character encoding
+ * appropriately for the locale, if the character encoding has not
+ * been explicitly set using [EMAIL PROTECTED] #setContentType} or
* [EMAIL PROTECTED] #setCharacterEncoding}, <code>getWriter</code> hasn't
* been called yet, and the response hasn't been committed yet.
- * If the deployment descriptor contains a
- * <code>locale-encoding-mapping-list</code> element,
- * and that element provides a mapping for the given locale,
- * that mapping is used. Otherwise, the mapping from locale to
- * character encoding is container dependent.
- * <p>This method has no effect if called after the response has been
- * committed. It does not set the response's character encoding if
- * it is called after <code>setContentType</code> has been called
- * with a charset specification, after
- * <code>setCharacterEncoding</code> has been called, after
+ * If the deployment descriptor contains a
+ * <code>locale-encoding-mapping-list</code> element, and that
+ * element provides a mapping for the given locale, that mapping
+ * is used. Otherwise, the mapping from locale to character
+ * encoding is container dependent.
+ * <p>This method may be called repeatedly to change locale and
+ * character encoding. The method has no effect if called after the
+ * response has been committed. It does not set the response's
+ * character encoding if it is called after [EMAIL PROTECTED] #setContentType}
+ * has been called with a charset specification, after
+ * [EMAIL PROTECTED] #setCharacterEncoding} has been called, after
* <code>getWriter</code> has been called, or after the response
* has been committed.
+ * <p>Containers must communicate the locale and the character encoding
+ * used for the servlet response's writer to the client if the protocol
+ * provides a way for doing so. In the case of HTTP, the locale is
+ * communicated via the <code>Content-Language</code> header,
+ * the character encoding as part of the <code>Content-Type</code>
+ * header for text media types. Note that the character encoding
+ * cannot be communicated via HTTP headers if the servlet does not
+ * specify a content type; however, it is still used to encode text
+ * written via the servlet response's writer.
*
* @param loc the locale of the response
*
Index: jsr154/src/share/javax/servlet/UnavailableException.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/UnavailableException.java,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 UnavailableException.java
--- jsr154/src/share/javax/servlet/UnavailableException.java 13 Aug 2002 16:21:43
-0000 1.1.1.1
+++ jsr154/src/share/javax/servlet/UnavailableException.java 30 Jul 2003 18:01:54
-0000
@@ -66,7 +66,7 @@
* that it is permanently or temporarily unavailable.
*
* <p>When a servlet or filter is permanently unavailable, something is wrong
- * with the it, and it cannot handle
+ * with 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
Index: jsr154/src/share/javax/servlet/http/Cookie.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/Cookie.java,v
retrieving revision 1.3
diff -u -r1.3 Cookie.java
--- jsr154/src/share/javax/servlet/http/Cookie.java 29 Apr 2003 20:46:51 -0000
1.3
+++ jsr154/src/share/javax/servlet/http/Cookie.java 30 Jul 2003 18:01:54 -0000
@@ -387,7 +387,7 @@
* <p>The default value is <code>false</code>.
*
* @param flag if <code>true</code>, sends the cookie from the browser
- * to the server using only when using a secure protocol;
+ * to the server only when using a secure protocol;
* if <code>false</code>, sent on any protocol
*
* @see #getSecure
Index: jsr154/src/share/javax/servlet/http/HttpServlet.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServlet.java,v
retrieving revision 1.5
diff -u -r1.5 HttpServlet.java
--- jsr154/src/share/javax/servlet/http/HttpServlet.java 28 Apr 2003 23:37:33
-0000 1.5
+++ jsr154/src/share/javax/servlet/http/HttpServlet.java 30 Jul 2003 18:01:54
-0000
@@ -831,10 +831,10 @@
*
* @exception IOException if an input or output error occurs
* while the servlet is handling the
- * TRACE request
+ * HTTP request
*
- * @exception ServletException if the request for the
- * TRACE cannot be handled
+ * @exception ServletException if the HTTP request cannot
+ * be handled
*
*
* @see javax.servlet.Servlet#service
Index: jsr154/src/share/javax/servlet/http/HttpServletRequest.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServletRequest.java,v
retrieving revision 1.4
diff -u -r1.4 HttpServletRequest.java
--- jsr154/src/share/javax/servlet/http/HttpServletRequest.java 11 Apr 2003 15:02:40
-0000 1.4
+++ jsr154/src/share/javax/servlet/http/HttpServletRequest.java 30 Jul 2003 18:01:54
-0000
@@ -87,15 +87,15 @@
*/
public static final String BASIC_AUTH = "BASIC";
/**
- * String identifier for Basic authentication. Value "FORM"
+ * String identifier for Form authentication. Value "FORM"
*/
public static final String FORM_AUTH = "FORM";
/**
- * String identifier for Basic authentication. Value "CLIENT_CERT"
+ * String identifier for Client Certificate authentication. Value "CLIENT_CERT"
*/
public static final String CLIENT_CERT_AUTH = "CLIENT_CERT";
/**
- * String identifier for Basic authentication. Value "DIGEST"
+ * String identifier for Digest authentication. Value "DIGEST"
*/
public static final String DIGEST_AUTH = "DIGEST";
@@ -248,7 +248,7 @@
* this request contains. If the request has no
* headers, this method returns an empty enumeration.
*
- * <p>Some servlet containers do not allow do not allow
+ * <p>Some servlet containers do not allow
* servlets to access headers using this method, in
* which case this method returns <code>null</code>
*
@@ -420,7 +420,7 @@
* value of the CGI variable REMOTE_USER.
*
* @return a <code>String</code> specifying the login
- * of the user making this request, or <code>null</code
+ * of the user making this request, or <code>null</code>
* if the user login is not known
*
*/
@@ -509,7 +509,7 @@
* <td><td>/a.html
* <tr><td>HEAD /xyz?a=b HTTP/1.1<td><td>/xyz
* </table>
- *
+ *
* <p>To reconstruct an URL with a scheme and host, use
* [EMAIL PROTECTED] HttpUtils#getRequestURL}.
*
@@ -529,7 +529,7 @@
* The returned URL contains a protocol, server name, port
* number, and server path, but it does not include query
* string parameters.
- *
+ *
* <p>Because this method returns a <code>StringBuffer</code>,
* not a string, you can modify the URL easily, for example,
* to append query parameters.
Index: jsr154/src/share/javax/servlet/http/HttpServletResponse.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpServletResponse.java,v
retrieving revision 1.4
diff -u -r1.4 HttpServletResponse.java
--- jsr154/src/share/javax/servlet/http/HttpServletResponse.java 22 Apr 2003
15:18:01 -0000 1.4
+++ jsr154/src/share/javax/servlet/http/HttpServletResponse.java 30 Jul 2003
18:01:54 -0000
@@ -135,7 +135,7 @@
* includes the logic to determine whether the session ID
* needs to be encoded in the URL. Because the rules for making
* this determination can differ from those used to decide whether to
- * encode a normal link, this method is seperate from the
+ * encode a normal link, this method is separete from the
* <code>encodeURL</code> method.
*
* <p>All URLs sent to the <code>HttpServletResponse.sendRedirect</code>
@@ -338,7 +338,7 @@
* Sets the status code for this response. This method is used to
* set the return status code when there is no error (for example,
* for the status codes SC_OK or SC_MOVED_TEMPORARILY). If there
- * is an error, and the caller wishes to invoke an <error-page> defined
+ * is an error, and the caller wishes to invoke an error-page defined
* in the web applicaion, the <code>sendError</code> method should be used
* instead.
* <p> The container clears the buffer and sets the Location header, preserving
@@ -546,7 +546,7 @@
* Status code (406) indicating that the resource identified by the
* request is only capable of generating response entities which have
* content characteristics not acceptable according to the accept
- * headerssent in the request.
+ * headers sent in the request.
*/
public static final int SC_NOT_ACCEPTABLE = 406;
@@ -560,7 +560,7 @@
/**
* Status code (408) indicating that the client did not produce a
- * requestwithin the time that the server was prepared to wait.
+ * request within the time that the server was prepared to wait.
*/
public static final int SC_REQUEST_TIMEOUT = 408;
Index: jsr154/src/share/javax/servlet/http/HttpSession.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpSession.java,v
retrieving revision 1.3
diff -u -r1.3 HttpSession.java
--- jsr154/src/share/javax/servlet/http/HttpSession.java 7 Apr 2003 21:27:36
-0000 1.3
+++ jsr154/src/share/javax/servlet/http/HttpSession.java 30 Jul 2003 18:01:55
-0000
@@ -92,7 +92,7 @@
* the session has been invalidatd or expired.
*
* <p> When container migrates a session between VMs in a distributed container
- * setting, all session atributes implementing the [EMAIL PROTECTED]
HttpSessionActivationListener}
+ * setting, all session attributes implementing the [EMAIL PROTECTED]
HttpSessionActivationListener}
* interface are notified.
*
* <p>A servlet should be able to handle cases in which
@@ -165,7 +165,7 @@
*
* Returns the last time the client sent a request associated with
* this session, as the number of milliseconds since midnight
- * January 1, 1970 GMT, and marked by the time the container recieved the
request.
+ * January 1, 1970 GMT, and marked by the time the container received the
request.
*
* <p>Actions that your application takes, such as getting or setting
* a value associated with the session, do not affect the access
Index: jsr154/src/share/javax/servlet/http/HttpSessionListener.java
===================================================================
RCS file:
/home/cvspublic/jakarta-servletapi-5/jsr154/src/share/javax/servlet/http/HttpSessionListener.java,v
retrieving revision 1.2
diff -u -r1.2 HttpSessionListener.java
--- jsr154/src/share/javax/servlet/http/HttpSessionListener.java 5 Mar 2003
19:42:48 -0000 1.2
+++ jsr154/src/share/javax/servlet/http/HttpSessionListener.java 30 Jul 2003
18:01:55 -0000
@@ -63,9 +63,9 @@
import java.util.EventListener;
/**
- * Implementations of this interface may are notified of changes to the
+ * Implementations of this interface are notified of changes to the
* list of active sessions in a web application.
- * To recieve notification events, the implementation class
+ * To receive notification events, the implementation class
* must be configured in the deployment descriptor for the web application.
* @see HttpSessionEvent
* @since v 2.3
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]