Author: remy.maucherat(a)jboss.com
Date: 2009-10-14 07:57:52 -0400 (Wed, 14 Oct 2009)
New Revision: 1193
Modified:
trunk/java/javax/servlet/HttpConstraintElement.java
trunk/java/javax/servlet/ServletContextAttributeListener.java
trunk/java/javax/servlet/ServletContextListener.java
trunk/java/javax/servlet/ServletRequestAttributeListener.java
trunk/java/javax/servlet/ServletRequestListener.java
trunk/java/javax/servlet/http/HttpServletRequest.java
trunk/java/javax/servlet/http/HttpServletResponse.java
trunk/java/javax/servlet/http/HttpSessionAttributeListener.java
trunk/java/javax/servlet/http/HttpSessionListener.java
Log:
- Cosmetic spec update.
Modified: trunk/java/javax/servlet/HttpConstraintElement.java
===================================================================
--- trunk/java/javax/servlet/HttpConstraintElement.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/HttpConstraintElement.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -55,9 +55,7 @@
* Constructs a default HTTP constraint element
*/
public HttpConstraintElement() {
- this.emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
- this.transportGuarantee = TransportGuarantee.NONE;
- rolesAllowed = new String[0];
+ this(EmptyRoleSemantic.PERMIT);
}
/**
@@ -66,9 +64,7 @@
* @param semantic should be EmptyRoleSemantic.DENY
*/
public HttpConstraintElement(EmptyRoleSemantic semantic) {
- this.emptyRoleSemantic = semantic;
- this.transportGuarantee = TransportGuarantee.NONE;
- rolesAllowed = new String[0];
+ this(semantic, TransportGuarantee.NONE, new String[0]);
}
/**
@@ -82,9 +78,7 @@
*/
public HttpConstraintElement(TransportGuarantee guarantee,
String... roleNames) {
- this.emptyRoleSemantic = EmptyRoleSemantic.PERMIT;
- this.transportGuarantee = guarantee;
- this.rolesAllowed = roleNames;
+ this(EmptyRoleSemantic.PERMIT, guarantee, roleNames);
}
/**
Modified: trunk/java/javax/servlet/ServletContextAttributeListener.java
===================================================================
--- trunk/java/javax/servlet/ServletContextAttributeListener.java 2009-10-11 17:55:58 UTC
(rev 1192)
+++ trunk/java/javax/servlet/ServletContextAttributeListener.java 2009-10-14 11:57:52 UTC
(rev 1193)
@@ -62,8 +62,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link ServletContext}.
*
* <p>The order in which implementations of this interface are invoked is
* unspecified.
Modified: trunk/java/javax/servlet/ServletContextListener.java
===================================================================
--- trunk/java/javax/servlet/ServletContextListener.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/ServletContextListener.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -62,8 +62,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link ServletContext}.
*
* <p>Implementations of this interface are invoked at their
* {@link #contextInitialized} method in the order in which they have been
Modified: trunk/java/javax/servlet/ServletRequestAttributeListener.java
===================================================================
--- trunk/java/javax/servlet/ServletRequestAttributeListener.java 2009-10-11 17:55:58 UTC
(rev 1192)
+++ trunk/java/javax/servlet/ServletRequestAttributeListener.java 2009-10-14 11:57:52 UTC
(rev 1193)
@@ -69,8 +69,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link ServletContext}.
*
* <p>The order in which implementations of this interface are invoked is
* unspecified.
Modified: trunk/java/javax/servlet/ServletRequestListener.java
===================================================================
--- trunk/java/javax/servlet/ServletRequestListener.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/ServletRequestListener.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -67,8 +67,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link ServletContext}.
*
* <p>Implementations of this interface are invoked at their
* {@link #requestInitialized} method in the order in which they have been
Modified: trunk/java/javax/servlet/http/HttpServletRequest.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServletRequest.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/http/HttpServletRequest.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -727,16 +727,16 @@
* login mechanism has committed, in the response, the message (e.g.,
* challenge) and HTTP status code to be returned to the user.
*
- * @exception IOException if an error occurs while writing
- * the response.
+ * @throws IOException if an input or output error occurred while
+ * reading from this request or writing to the given response
*
- * @exception ServletException if the authentication failed and
- * the caller is responsible for
- * handling the error (i.e., the
- * underlying login mechanism did
- * NOT establish the message and
- * HTTP status code to be returned
- * to the user).
+ * @throws IllegalStateException if the login mechanism attempted to
+ * modify the response and it was already committed
+ *
+ * @throws ServletException if the authentication failed and
+ * the caller is responsible for handling the error (i.e., the
+ * underlying login mechanism did NOT establish the message and
+ * HTTP status code to be returned to the user)
*
* @since Servlet 3.0
*/
Modified: trunk/java/javax/servlet/http/HttpServletResponse.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServletResponse.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/http/HttpServletResponse.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -171,14 +171,16 @@
/**
* Sends an error response to the client using the specified
- * status. The server defaults to creating the
+ * status and clears the buffer. The server defaults to creating the
* response to look like an HTML-formatted server error page
* containing the specified message, setting the content type
- * to "text/html", leaving cookies and other headers unmodified.
+ * to "text/html". The server will preserve cookies and may clear or
+ * update any headers needed to serve the error page as a valid response.
*
* If an error-page declaration has been made for the web application
* corresponding to the status code passed in, it will be served back in
- * preference to the suggested msg parameter.
+ * preference to the suggested msg parameter and the msg parameter will
+ * be ignored.
*
* <p>If the response has already been committed, this method throws
* an IllegalStateException.
@@ -195,7 +197,15 @@
/**
* Sends an error response to the client using the specified status
- * code and clearing the buffer.
+ * code and clears the buffer.
+ *
+ * The server will preserve cookies and may clear or
+ * update any headers needed to serve the error page as a valid response.
+ *
+ * If an error-page declaration has been made for the web application
+ * corresponding to the status code passed in, it will be served back
+ * the error page
+ *
* <p>If the response has already been committed, this method throws
* an IllegalStateException.
* After using this method, the response should be considered
@@ -211,8 +221,11 @@
/**
* Sends a temporary redirect response to the client using the
- * specified redirect location URL. This method can accept relative URLs;
- * the servlet container must convert the relative URL to an absolute URL
+ * specified redirect location URL and clears the buffer. The buffer will
+ * be replaced with the data set by this method. Calling this method sets the
+ * status code to {@link #SC_FOUND} 302 (Found).
+ * This method can accept relative URLs;the servlet container must convert
+ * the relative URL to an absolute URL
* before sending the response to the client. If the location is relative
* without a leading '/' the container interprets it as relative to
* the current request URI. If the location is relative with a leading
@@ -330,15 +343,22 @@
/**
- * 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
- * in the web application, the <code>sendError</code> method should be
used
- * instead.
- * <p> The container clears the buffer and sets the Location header,
preserving
- * cookies and other headers.
+ * Sets the status code for this response.
*
+ * <p>This method is used to set the return status code when there is
+ * no error (for example, for the SC_OK or SC_MOVED_TEMPORARILY status
+ * codes).
+ *
+ * <p>If this method is used to set an error code, then the container's
+ * error page mechanism will not be triggered. If there is an error and
+ * the caller wishes to invoke an error page defined in the web
+ * application, then {@link #sendError} must be used instead.
+ *
+ * <p>This method preserves any cookies and other response headers.
+ *
+ * <p>Valid status codes are those in the 2XX, 3XX, 4XX, and 5XX ranges.
+ * Other status codes are treated as container specific.
+ *
* @param sc the status code
*
* @see #sendError
Modified: trunk/java/javax/servlet/http/HttpSessionAttributeListener.java
===================================================================
--- trunk/java/javax/servlet/http/HttpSessionAttributeListener.java 2009-10-11 17:55:58
UTC (rev 1192)
+++ trunk/java/javax/servlet/http/HttpSessionAttributeListener.java 2009-10-14 11:57:52
UTC (rev 1193)
@@ -62,8 +62,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link javax.servlet.ServletContext}.
*
* <p>The order in which implementations of this interface are invoked is
* unspecified.
Modified: trunk/java/javax/servlet/http/HttpSessionListener.java
===================================================================
--- trunk/java/javax/servlet/http/HttpSessionListener.java 2009-10-11 17:55:58 UTC (rev
1192)
+++ trunk/java/javax/servlet/http/HttpSessionListener.java 2009-10-14 11:57:52 UTC (rev
1193)
@@ -62,8 +62,9 @@
*
* <p>In order to receive these notification events, the implementation
* class must be either declared in the deployment descriptor of the web
- * application or annotated with
- * {@link javax.servlet.annotation.WebListener}.
+ * application, annotated with {@link javax.servlet.annotation.WebListener},
+ * or registered via one of the addListener methods defined on
+ * {@link javax.servlet.ServletContext}.
*
* <p>Implementations of this interface are invoked at their
* {@link #sessionCreated} method in the order in which they have been