Author: remy.maucherat(a)jboss.com
Date: 2009-11-08 23:36:50 -0500 (Sun, 08 Nov 2009)
New Revision: 1256
Modified:
trunk/java/javax/servlet/AsyncContext.java
trunk/java/javax/servlet/ServletContext.java
trunk/java/javax/servlet/http/Cookie.java
Log:
- Spec update.
Modified: trunk/java/javax/servlet/AsyncContext.java
===================================================================
--- trunk/java/javax/servlet/AsyncContext.java 2009-11-09 03:56:49 UTC (rev 1255)
+++ trunk/java/javax/servlet/AsyncContext.java 2009-11-09 04:36:50 UTC (rev 1256)
@@ -419,6 +419,11 @@
* <p>The given AsyncListener class must define a zero argument
* constructor, which is used to instantiate it.
*
+ * <p>This method supports resource injection if the given
+ * <tt>clazz</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
+
* <p>This method supports any annotations applicable to AsyncListener.
*
* @param clazz the AsyncListener class to instantiate
Modified: trunk/java/javax/servlet/ServletContext.java
===================================================================
--- trunk/java/javax/servlet/ServletContext.java 2009-11-09 03:56:49 UTC (rev 1255)
+++ trunk/java/javax/servlet/ServletContext.java 2009-11-09 04:36:50 UTC (rev 1256)
@@ -748,10 +748,15 @@
* 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.
+ * <p>This method introspects the class with the given
<tt>className</tt>
+ * for the {@link javax.servlet.annotation.ServletSecurity},
+ * {@link javax.servlet.annotation.MultipartConfig},
+ * <tt>javax.annotation.security.RunAs</tt>, and
+ * <tt>javax.annotation.security.DeclareRoles</tt> annotations.
+ * In addition, this method supports resource injection if the
+ * class with the given <tt>className</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param servletName the name of the servlet
* @param className the fully qualified class name of the servlet
@@ -828,10 +833,15 @@
* 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.
+ * <p>This method introspects the given <tt>servletClass</tt> for
+ * the {@link javax.servlet.annotation.ServletSecurity},
+ * {@link javax.servlet.annotation.MultipartConfig},
+ * <tt>javax.annotation.security.RunAs</tt>, and
+ * <tt>javax.annotation.security.DeclareRoles</tt> annotations.
+ * In addition, this method supports resource injection if the
+ * given <tt>servletClass</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param servletName the name of the servlet
* @param servletClass the class object from which the servlet will be
@@ -867,10 +877,16 @@
* <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.
+ * <p>This method introspects the given <tt>clazz</tt> for
+ * the following annotations:
+ * {@link javax.servlet.annotation.ServletSecurity},
+ * {@link javax.servlet.annotation.MultipartConfig},
+ * <tt>javax.annotation.security.RunAs</tt>, and
+ * <tt>javax.annotation.security.DeclareRoles</tt>.
+ * In addition, this method supports resource injection if the
+ * given <tt>clazz</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param clazz the Servlet class to instantiate
*
@@ -953,10 +969,10 @@
* 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.
+ * <p>This method supports resource injection if the class with the
+ * given <tt>className</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param filterName the name of the filter
* @param className the fully qualified class name of the filter
@@ -1030,10 +1046,10 @@
* 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.
+ * <p>This method supports resource injection if the given
+ * <tt>filterClass</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param filterName the name of the filter
* @param filterClass the class object from which the filter will be
@@ -1069,10 +1085,10 @@
* <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.
+ * <p>This method supports resource injection if the given
+ * <tt>clazz</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param clazz the Filter class to instantiate
*
@@ -1269,10 +1285,10 @@
* 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.
+ * <p>This method supports resource injection if the class with the
+ * given <tt>className</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param className the fully qualified class name of the listener
*
@@ -1369,10 +1385,10 @@
* 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.
+ * <p>This method supports resource injection if the given
+ * <tt>listenerClass</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param listenerClass the listener class to be instantiated
*
@@ -1414,10 +1430,10 @@
* <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.
+ * <p>This method supports resource injection if the given
+ * <tt>clazz</tt> represents a Managed Bean.
+ * See the Java EE platform and JSR 299 specifications for additional
+ * details about Managed Beans and resource injection.
*
* @param clazz the EventListener class to instantiate
*
Modified: trunk/java/javax/servlet/http/Cookie.java
===================================================================
--- trunk/java/javax/servlet/http/Cookie.java 2009-11-09 03:56:49 UTC (rev 1255)
+++ trunk/java/javax/servlet/http/Cookie.java 2009-11-09 04:36:50 UTC (rev 1256)
@@ -96,10 +96,20 @@
*/
public class Cookie implements Cloneable, Serializable {
- private static final long serialVersionUID = -6454587001725327448L;
+ private static final long serialVersionUID = 4014436410614806011L;
- private static final String tspecials = "/()<>@,;:\\\"[]?={}
\t";
+ public static final boolean STRICT =
+ Boolean.valueOf(System.getProperty("Cookie.STRICT",
"false")).booleanValue();
+ private static final String tspecials;
+ static {
+ if (STRICT) {
+ tspecials = "/()<>@,;:\\\"[]?={} \t";
+ } else {
+ tspecials = ",; ";
+ }
+ }
+
private static final String LSTRING_FILE =
"javax.servlet.http.LocalStrings";