Author: remy.maucherat(a)jboss.com
Date: 2009-09-30 06:30:15 -0400 (Wed, 30 Sep 2009)
New Revision: 1181
Modified:
trunk/java/javax/servlet/AsyncContext.java
trunk/java/javax/servlet/ServletContainerInitializer.java
trunk/java/javax/servlet/ServletContext.java
trunk/java/javax/servlet/annotation/MultipartConfig.java
trunk/java/javax/servlet/http/HttpServlet.java
Log:
- Spec update.
Modified: trunk/java/javax/servlet/AsyncContext.java
===================================================================
--- trunk/java/javax/servlet/AsyncContext.java 2009-09-25 14:57:35 UTC (rev 1180)
+++ trunk/java/javax/servlet/AsyncContext.java 2009-09-30 10:30:15 UTC (rev 1181)
@@ -147,11 +147,12 @@
* to the servlet container.
*
* <p>If the asynchronous cycle was started with
- * {@link ServletRequest#startAsync(ServletRequest, ServletResponse)}
- * then the dispatch is to the URI of the request passed to startAsync.
- * If the asynchronous cycle was started with
- * {@link ServletRequest#startAsync()}, then the dispatch is to the
- * URI of the request when it was last dispatched by the container.
+ * {@link ServletRequest#startAsync(ServletRequest, ServletResponse)},
+ * and the request passed is an instance of HttpServletRequest,
+ * then the dispatch is to the URI returned by
+ * {@link javax.servlet.http.HttpServletRequest#getRequestURI}.
+ * Otherwise, the dispatch is to the URI of the request when it was
+ * last dispatched by the container.
*
* <p>The following sequence illustrates how this will work:
* <code><pre>
Modified: trunk/java/javax/servlet/ServletContainerInitializer.java
===================================================================
--- trunk/java/javax/servlet/ServletContainerInitializer.java 2009-09-25 14:57:35 UTC (rev
1180)
+++ trunk/java/javax/servlet/ServletContainerInitializer.java 2009-09-30 10:30:15 UTC (rev
1181)
@@ -54,11 +54,29 @@
* by the annotation, the container must pass a <tt>null</tt> Set of classes
* to {@link #onStartup}.
*
+ * <p>When examining the classes of an application to
+ * see if they match any of the criteria specified by the HandlesTypes
+ * annotation of a ServletContainerInitializer, the container may run into
+ * classloading problems if any of the application's optional JAR
+ * files are missing. Because the container is not in a position to decide
+ * whether these types of classloading failures will prevent
+ * the application from working correctly, it must ignore them,
+ * while at the same time providing a configuration option that would
+ * log them.
+ *
* <p>Implementations of this interface may be declared by a JAR file
* resource located inside the <tt>META-INF/services</tt> directory and
* named for the fully qualified class name of this interface, and will be
* discovered using the runtime's service provider lookup mechanism.
*
+ * <p>When an application is deployed, the order in which
+ * ServletContainerInitializer implementations are discovered
+ * by the runtime's service lookup mechanism must follow the
+ * application's classloading delegation model.
+ * Any ServletContainerInitializer implementations declared in
+ * any of the application's web fragment JAR files that are excluded
+ * from absolute ordering must be ignored.
+ *
* @see javax.servlet.annotation.HandlesTypes
*
* @since Servlet 3.0
Modified: trunk/java/javax/servlet/ServletContext.java
===================================================================
--- trunk/java/javax/servlet/ServletContext.java 2009-09-25 14:57:35 UTC (rev 1180)
+++ trunk/java/javax/servlet/ServletContext.java 2009-09-30 10:30:15 UTC (rev 1181)
@@ -748,6 +748,11 @@
* it will be completed (by assigning the given <tt>className</tt> to
it)
* and returned.
*
+ * <p>This method supports any annotations applicable to Servlets
+ * that may have been specified on the class with the given
+ * <tt>className</tt>, with the exception of
+ * {@link javax.servlet.annotation.WebServlet}, which is ignored.
+ *
* @param servletName the name of the servlet
* @param className the fully qualified class name of the servlet
*
@@ -823,6 +828,11 @@
* it will be completed (by assigning the name of the given
* <tt>servletClass</tt> to it) and returned.
*
+ * <p>This method supports any annotations applicable to Servlets
+ * that may have been specified on the given <tt>servletClass</tt>,
+ * with the exception of {@link javax.servlet.annotation.WebServlet},
+ * which is ignored.
+ *
* @param servletName the name of the servlet
* @param servletClass the class object from which the servlet will be
* instantiated
@@ -850,9 +860,6 @@
/**
* Instantiates the given Servlet class.
*
- * <p>This method must support all annotations applicable to Servlets
- * as defined by the Servlet specification.
- *
* <p>The returned Servlet instance may be further customized before it
* is registered with this ServletContext via a call to
* {@link #addServlet(String,Servlet)}.
@@ -860,6 +867,11 @@
* <p>The given Servlet class must define a zero argument constructor,
* which is used to instantiate it.
*
+ * <p>This method supports any annotations applicable to Servlets
+ * that may have been specified on the given <tt>clazz</tt>, with the
+ * exception of {@link javax.servlet.annotation.WebServlet}, which
+ * is ignored.
+ *
* @param clazz the Servlet class to instantiate
*
* @return the new Servlet instance
@@ -941,6 +953,11 @@
* it will be completed (by assigning the given <tt>className</tt> to
it)
* and returned.
*
+ * <p>This method supports any annotations applicable to Filters
+ * that may have been specified on the class with the given
+ * <tt>className</tt>, with the exception of
+ * {@link javax.servlet.annotation.WebFilter}, which is ignored.
+ *
* @param filterName the name of the filter
* @param className the fully qualified class name of the filter
*
@@ -1013,6 +1030,11 @@
* it will be completed (by assigning the name of the given
* <tt>filterClass</tt> to it) and returned.
*
+ * <p>This method supports any annotations applicable to Filters
+ * that may have been specified on the given <tt>filterClass</tt>,
+ * with the exception of {@link javax.servlet.annotation.WebFilter},
+ * which is ignored.
+ *
* @param filterName the name of the filter
* @param filterClass the class object from which the filter will be
* instantiated
@@ -1040,9 +1062,6 @@
/**
* Instantiates the given Filter class.
*
- * <p>This method must support all annotations applicable to Filters
- * as defined by the Servlet specification.
- *
* <p>The returned Filter instance may be further customized before it
* is registered with this ServletContext via a call to
* {@link #addFilter(String,Filter)}.
@@ -1050,6 +1069,11 @@
* <p>The given Filter class must define a zero argument constructor,
* which is used to instantiate it.
*
+ * <p>This method supports any annotations applicable to Filters
+ * that may have been specified on the given <tt>clazz</tt>, with the
+ * exception of {@link javax.servlet.annotation.WebFilter}, which is
+ * ignored.
+ *
* @param clazz the Filter class to instantiate
*
* @return the new Filter instance
@@ -1245,6 +1269,11 @@
* then the new listener will be added to the end of the ordered list of
* listeners of that interface.
*
+ * <p>This method supports any annotations applicable to the above
+ * types of listeners that may have been specified on the class with the
+ * given <tt>className</tt>, with the exception of
+ * {@link javax.servlet.annotation.WebListener}, which is ignored.
+ *
* @param className the fully qualified class name of the listener
*
* @throws IllegalArgumentException if the class with the given name
@@ -1340,6 +1369,11 @@
* then the new listener will be added to the end of the ordered list
* of listeners of that interface.
*
+ * <p>This method supports any annotations applicable to the above
+ * types of listeners that may have been specified on the given
+ * <tt>listenerClass</tt>, with the exception of
+ * {@link javax.servlet.annotation.WebListener}, which is ignored.
+ *
* @param listenerClass the listener class to be instantiated
*
* @throws IllegalArgumentException if the given <tt>listenerClass</tt>
@@ -1373,9 +1407,6 @@
* <code>{@link javax.servlet.http.HttpSessionAttributeListener}</code>
* interfaces.
*
- * <p>This method must support all annotations applicable to the above
- * listener interfaces as defined by the Servlet specification.
- *
* <p>The returned EventListener instance may be further customized
* before it is registered with this ServletContext via a call to
* {@link #addListener(EventListener)}.
@@ -1383,6 +1414,11 @@
* <p>The given EventListener class must define a zero argument
* constructor, which is used to instantiate it.
*
+ * <p>This method supports any annotations applicable to the above
+ * types of listeners that may have been specified on the given
+ * <tt>clazz</tt>, with the exception of
+ * {@link javax.servlet.annotation.WebListener}, which is ignored.
+ *
* @param clazz the EventListener class to instantiate
*
* @return the new EventListener instance
Modified: trunk/java/javax/servlet/annotation/MultipartConfig.java
===================================================================
--- trunk/java/javax/servlet/annotation/MultipartConfig.java 2009-09-25 14:57:35 UTC (rev
1180)
+++ trunk/java/javax/servlet/annotation/MultipartConfig.java 2009-09-30 10:30:15 UTC (rev
1181)
@@ -41,6 +41,18 @@
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
+/**
+ * Annotation that may be specified on a {@link javax.servlet.Servlet}
+ * class, indicating that instances of the <tt>Servlet</tt> expect requests
+ * that conform to the <tt>multipart/form-data</tt> MIME type.
+ *
+ * <p>Servlets annotated with <tt>MultipartConfig</tt> may retrieve
the
+ * {@link javax.servlet.http.Part} components of a given
+ * <tt>multipart/form-data</tt> request by calling
+ * {@link javax.servlet.http.HttpServletRequest#getPart getPart} or
+ * {@link javax.servlet.http.HttpServletRequest#getParts getParts}.
+ */
+
@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
public @interface MultipartConfig {
Modified: trunk/java/javax/servlet/http/HttpServlet.java
===================================================================
--- trunk/java/javax/servlet/http/HttpServlet.java 2009-09-25 14:57:35 UTC (rev 1180)
+++ trunk/java/javax/servlet/http/HttpServlet.java 2009-09-30 10:30:15 UTC (rev 1181)
@@ -734,7 +734,7 @@
doGet(req, resp);
} else {
long ifModifiedSince = req.getDateHeader(HEADER_IFMODSINCE);
- if (ifModifiedSince < (lastModified / 1000 * 1000)) {
+ if (ifModifiedSince < lastModified) {
// If the servlet mod time is later, call doGet()
// Round down to the nearest second for a proper compare
// A ifModifiedSince of -1 will always be less