geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From strub...@apache.org
Subject svn commit: r1858615 [11/32] - in /geronimo/specs/branches/jakarta: geronimo-jakarta-jsp_spec/ geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/ geronimo-jakarta-jsp_spec/src/main/java/jakarta/servlet/jsp/el/ geronimo-jakarta-jsp_spec/src/ma...
Date Sat, 04 May 2019 21:29:41 GMT
Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/ServletSecurityElement.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/ServletSecurityElement.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/ServletSecurityElement.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/ServletSecurityElement.java Sat May  4 21:29:39 2019
@@ -1,93 +1,135 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet;
+package jakarta.servlet;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import java.util.Collections;
-import java.util.LinkedHashSet;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
 
-import javax.servlet.annotation.HttpMethodConstraint;
-import javax.servlet.annotation.ServletSecurity;
+import jakarta.servlet.annotation.HttpMethodConstraint;
+import jakarta.servlet.annotation.ServletSecurity;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ *
+ * @since Servlet 3.0
+ * TODO SERVLET3 - Add comments
  */
 public class ServletSecurityElement extends HttpConstraintElement {
 
-    private final Collection<HttpMethodConstraintElement> httpMethodConstraints;
-
-    private final Collection<String> methodNames;
+    private final Map<String,HttpMethodConstraintElement> methodConstraints =
+        new HashMap<>();
 
+    /**
+     * Use default HttpConstraint.
+     */
     public ServletSecurityElement() {
-        httpMethodConstraints = Collections.emptySet();
-        methodNames = Collections.emptySet();
+        super();
     }
 
-    public ServletSecurityElement(HttpConstraintElement defaultHttpConstraintElement) {
-        super(defaultHttpConstraintElement.getEmptyRoleSemantic(), defaultHttpConstraintElement.getTransportGuarantee(), defaultHttpConstraintElement.getRolesAllowed());
-        httpMethodConstraints = Collections.emptySet();
-        methodNames = Collections.emptySet();
+    /**
+     * Use specified HttpConstraintElement.
+     * @param httpConstraintElement The constraint
+     */
+    public ServletSecurityElement(HttpConstraintElement httpConstraintElement) {
+        this (httpConstraintElement, null);
+    }
+
+    /**
+     * Use specific constraints for specified methods and default
+     * HttpConstraintElement for all other methods.
+     * @param httpMethodConstraints Method constraints
+     * @throws IllegalArgumentException if a method name is specified more than
+     * once
+     */
+    public ServletSecurityElement(
+            Collection<HttpMethodConstraintElement> httpMethodConstraints) {
+        super();
+        addHttpMethodConstraints(httpMethodConstraints);
     }
 
-    public ServletSecurityElement(Collection<HttpMethodConstraintElement> httpMethodConstraints) throws IllegalArgumentException {
-        this.httpMethodConstraints = httpMethodConstraints;
-        this.methodNames = toMethodNames(httpMethodConstraints);
-    }
 
-    public ServletSecurityElement(HttpConstraintElement httpConstraintElement, Collection<HttpMethodConstraintElement> httpMethodConstraints) throws IllegalArgumentException {
-        super(httpConstraintElement.getEmptyRoleSemantic(), httpConstraintElement.getTransportGuarantee(), httpConstraintElement.getRolesAllowed());
-        this.httpMethodConstraints = Collections.unmodifiableCollection(httpMethodConstraints);
-        this.methodNames = toMethodNames(httpMethodConstraints);
-    }
-
-    public ServletSecurityElement(ServletSecurity servletSecurity) throws IllegalArgumentException {
-        super(servletSecurity.value().value(), servletSecurity.value().transportGuarantee(), servletSecurity.value().rolesAllowed());
-        Collection<HttpMethodConstraintElement> httpMethodConstraints = new ArrayList<HttpMethodConstraintElement>();
-        for (HttpMethodConstraint constraint: servletSecurity.httpMethodConstraints()) {
-            httpMethodConstraints.add(new HttpMethodConstraintElement(constraint.value(),
-                    new HttpConstraintElement(constraint.emptyRoleSemantic(),
-                            constraint.transportGuarantee(),
-                            constraint.rolesAllowed())));
+    /**
+     * Use specified HttpConstraintElement as default and specific constraints
+     * for specified methods.
+     * @param httpConstraintElement Default constraint
+     * @param httpMethodConstraints Method constraints
+     * @throws IllegalArgumentException if a method name is specified more than
+     */
+    public ServletSecurityElement(HttpConstraintElement httpConstraintElement,
+            Collection<HttpMethodConstraintElement> httpMethodConstraints) {
+        super(httpConstraintElement.getEmptyRoleSemantic(),
+                httpConstraintElement.getTransportGuarantee(),
+                httpConstraintElement.getRolesAllowed());
+        addHttpMethodConstraints(httpMethodConstraints);
+    }
+
+    /**
+     * Create from an annotation.
+     * @param annotation Annotation to use as the basis for the new instance
+     * @throws IllegalArgumentException if a method name is specified more than
+     */
+    public ServletSecurityElement(ServletSecurity annotation) {
+        this(new HttpConstraintElement(annotation.value().value(),
+                annotation.value().transportGuarantee(),
+                annotation.value().rolesAllowed()));
+
+        List<HttpMethodConstraintElement> l = new ArrayList<>();
+        HttpMethodConstraint[] constraints = annotation.httpMethodConstraints();
+        if (constraints != null) {
+            for (int i = 0; i < constraints.length; i++) {
+                HttpMethodConstraintElement e =
+                    new HttpMethodConstraintElement(constraints[i].value(),
+                            new HttpConstraintElement(
+                                    constraints[i].emptyRoleSemantic(),
+                                    constraints[i].transportGuarantee(),
+                                    constraints[i].rolesAllowed()));
+                l.add(e);
+            }
         }
-        this.httpMethodConstraints = Collections.unmodifiableCollection(httpMethodConstraints);
-        methodNames = toMethodNames(httpMethodConstraints);
+        addHttpMethodConstraints(l);
     }
 
     public Collection<HttpMethodConstraintElement> getHttpMethodConstraints() {
-        return httpMethodConstraints;
+        Collection<HttpMethodConstraintElement> result = new HashSet<>();
+        result.addAll(methodConstraints.values());
+        return result;
     }
 
     public Collection<String> getMethodNames() {
-        return methodNames;
+        Collection<String> result = new HashSet<>();
+        result.addAll(methodConstraints.keySet());
+        return result;
     }
 
-    private static Collection<String> toMethodNames(Collection<HttpMethodConstraintElement> constraints) throws IllegalArgumentException {
-        Collection<String> methodNames = new LinkedHashSet<String>(constraints.size());
-        for (HttpMethodConstraintElement constraint: constraints) {
-            if (!methodNames.add(constraint.getMethodName())) {
-                throw new IllegalArgumentException("duplicate method name: " + constraint.getMethodName());
+    private void addHttpMethodConstraints(
+            Collection<HttpMethodConstraintElement> httpMethodConstraints) {
+        if (httpMethodConstraints == null) {
+            return;
+        }
+        for (HttpMethodConstraintElement constraint : httpMethodConstraints) {
+            String method = constraint.getMethodName();
+            if (methodConstraints.containsKey(method)) {
+                throw new IllegalArgumentException(
+                        "Duplicate method name: " + method);
             }
+            methodConstraints.put(method, constraint);
         }
-        return Collections.unmodifiableCollection(methodNames);
     }
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionCookieConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionCookieConfig.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionCookieConfig.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionCookieConfig.java Sat May  4 21:29:39 2019
@@ -1,61 +1,110 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet;
+package jakarta.servlet;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * Configures the session cookies used by the web application associated with
+ * the ServletContext from which this SessionCookieConfig was obtained.
+ *
+ * @since Servlet 3.0
  */
 public interface SessionCookieConfig {
 
-    String getComment();
+    /**
+     * Sets the session cookie name.
+     *
+     * @param name The name of the session cookie
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setName(String name);
 
-    String getDomain();
+    public String getName();
 
     /**
+     * Sets the domain for the session cookie
      *
-     * @return max age in seconds for this session cookie
+     * @param domain The session cookie domain
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
      */
-    int getMaxAge();
+    public void setDomain(String domain);
 
-    String getName();
+    public String getDomain();
 
-    String getPath();
+    /**
+     * Sets the path of the session cookie.
+     *
+     * @param path The session cookie path
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setPath(String path);
+
+    public String getPath();
 
-    boolean isHttpOnly();
+    /**
+     * Sets the comment for the session cookie
+     *
+     * @param comment The session cookie comment
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setComment(String comment);
 
-    boolean isSecure();
+    public String getComment();
 
-    void setComment(String comment);
+    /**
+     * Sets the httpOnly flag for the session cookie.
+     *
+     * @param httpOnly The httpOnly setting to use for session cookies
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setHttpOnly(boolean httpOnly);
 
-    void setDomain(String domain);
+    public boolean isHttpOnly();
 
-    void setHttpOnly(boolean httpOnly);
+    /**
+     * Sets the secure flag for the session cookie.
+     *
+     * @param secure The secure setting to use for session cookies
+     *
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setSecure(boolean secure);
 
-    void setMaxAge(int maxAge);
+    public boolean isSecure();
 
-    void setName(String name);
+    /**
+     * Sets the maximum age.
+     *
+     * @param MaxAge the maximum age to set
+     * @throws IllegalStateException if the associated ServletContext has
+     *         already been initialised
+     */
+    public void setMaxAge(int MaxAge);
 
-    void setPath(String path);
+    public int getMaxAge();
 
-    void setSecure(boolean secure);
-    
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionTrackingMode.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionTrackingMode.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionTrackingMode.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SessionTrackingMode.java Sat May  4 21:29:39 2019
@@ -1,37 +1,26 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-package javax.servlet;
+* Licensed to the Apache Software Foundation (ASF) under one or more
+* contributor license agreements.  See the NOTICE file distributed with
+* this work for additional information regarding copyright ownership.
+* The ASF licenses this file to You under the Apache License, Version 2.0
+* (the "License"); you may not use this file except in compliance with
+* the License.  You may obtain a copy of the License at
+*
+*     http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+package jakarta.servlet;
 
 /**
- * Session tracking modes.  Expected order is shown at
- * http://javadoc.glassfish.org/javaee6/apidoc/javax/servlet/SessionTrackingMode.html
- * under "Enum constant details, not "Enum constant summary"
- *
- * @version $Rev$ $Date$
- * @since 3.0
+ * @since Servlet 3.0
  */
 public enum SessionTrackingMode {
-
     COOKIE,
     URL,
     SSL
-
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SingleThreadModel.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SingleThreadModel.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SingleThreadModel.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/SingleThreadModel.java Sat May  4 21:29:39 2019
@@ -1,50 +1,43 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-package javax.servlet;
+package jakarta.servlet;
 
 /**
- * Ensures that servlets handle
- * only one request at a time. This interface has no methods.
- *
- * <p>If a servlet implements this interface, you are <i>guaranteed</i>
- * that no two threads will execute concurrently in the
- * servlet's <code>service</code> method. The servlet container
- * can make this guarantee by synchronizing access to a single
- * instance of the servlet, or by maintaining a pool of servlet
+ * Ensures that servlets handle only one request at a time. This interface has
+ * no methods.
+ * <p>
+ * If a servlet implements this interface, you are <i>guaranteed</i> that no two
+ * threads will execute concurrently in the servlet's <code>service</code>
+ * method. The servlet container can make this guarantee by synchronizing access
+ * to a single instance of the servlet, or by maintaining a pool of servlet
  * instances and dispatching each new request to a free servlet.
+ * <p>
+ * Note that SingleThreadModel does not solve all thread safety issues. For
+ * example, session attributes and static variables can still be accessed by
+ * multiple requests on multiple threads at the same time, even when
+ * SingleThreadModel servlets are used. It is recommended that a developer take
+ * other means to resolve those issues instead of implementing this interface,
+ * such as avoiding the usage of an instance variable or synchronizing the block
+ * of the code accessing those resources. This interface is deprecated in
+ * Servlet API version 2.4.
  *
- * <p>Note that SingleThreadModel does not solve all thread safety
- * issues.  For example, session attributes and static variables can
- * still be accessed by multiple requests on multiple threads
- * at the same time, even when SingleThreadModel servlets are used.
- * It is recommended that a developer take other means to resolve
- * those issues instead of implementing this interface, such as
- * avoiding the usage of an instance variable or synchronizing
- * the block of the code accessing those resources.
- * This interface is deprecated in Servlet API version 2.4.
- *
- * @version $Rev$ $Date$
- *
- * @deprecated	As of Java Servlet API 2.4, with no direct
- *	replacement.
+ * @deprecated As of Java Servlet API 2.4, with no direct replacement.
  */
-
+@Deprecated
 public interface SingleThreadModel {
+    // No methods
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/UnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/UnavailableException.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/UnavailableException.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/UnavailableException.java Sat May  4 21:29:39 2019
@@ -1,84 +1,82 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
 
-package javax.servlet;
+package jakarta.servlet;
 
 /**
- * Defines an exception that a servlet or filter throws to indicate
- * that it is permanently or temporarily unavailable.
- * <p/>
- * <p>When a servlet or filter is permanently unavailable, something is wrong
- * 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
+ * Defines an exception that a servlet or filter throws to indicate that it is
+ * permanently or temporarily unavailable.
+ * <p>
+ * When a servlet or filter is permanently unavailable, something is wrong 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
  * that is needed.
- * <p/>
- * <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
- * administrator may need to take corrective action.
- * <p/>
- * <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 or filter for a period
- * of time suggested by the exception, rather than rejecting them until
- * the servlet container restarts.
- *
- * @version $Rev$ $Date$
+ * <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 administrator may need to take corrective
+ * action.
+ * <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 or filter for a period of time suggested by the
+ * exception, rather than rejecting them until the servlet container restarts.
  */
-
 public class UnavailableException extends ServletException {
 
-    private final Servlet servlet;           // what's unavailable
-    private final boolean permanent;         // needs admin action?
-    private final int seconds;           // unavailability estimate
+    private static final long serialVersionUID = 1L;
+
+    private final Servlet servlet; // what's unavailable
+    private final boolean permanent; // needs admin action?
+    private final int seconds; // unavailability estimate
 
     /**
-     * @param servlet the <code>Servlet</code> instance that is
-     *                unavailable
-     * @param msg     a <code>String</code> specifying the
-     *                descriptive message
-     * @deprecated As of Java Servlet API 2.2, use {@link
-     * #UnavailableException(String)} instead.
+     * @param servlet
+     *            the <code>Servlet</code> instance that is unavailable
+     * @param msg
+     *            a <code>String</code> specifying the descriptive message
+     * @deprecated As of Java Servlet API 2.2, use
+     *             {@link #UnavailableException(String)} instead.
      */
+    @Deprecated
     public UnavailableException(Servlet servlet, String msg) {
         super(msg);
         this.servlet = servlet;
         permanent = true;
-        seconds = -1;
+        this.seconds = 0;
     }
 
     /**
-     * @param seconds an integer specifying the number of seconds
-     *                the servlet expects to be unavailable; if
-     *                zero or negative, indicates that the servlet
-     *                can't make an estimate
-     * @param servlet the <code>Servlet</code> that is unavailable
-     * @param msg     a <code>String</code> specifying the descriptive
-     *                message, which can be written to a log file or
-     *                displayed for the user.
-     * @deprecated As of Java Servlet API 2.2, use {@link
-     * #UnavailableException(String, int)} instead.
+     * @param seconds
+     *            an integer specifying the number of seconds the servlet
+     *            expects to be unavailable; if zero or negative, indicates that
+     *            the servlet can't make an estimate
+     * @param servlet
+     *            the <code>Servlet</code> that is unavailable
+     * @param msg
+     *            a <code>String</code> specifying the descriptive message,
+     *            which can be written to a log file or displayed for the user.
+     * @deprecated As of Java Servlet API 2.2, use
+     *             {@link #UnavailableException(String, int)} instead.
      */
+    @Deprecated
     public UnavailableException(int seconds, Servlet servlet, String msg) {
         super(msg);
         this.servlet = servlet;
@@ -90,93 +88,88 @@ public class UnavailableException extend
     }
 
     /**
-     * Constructs a new exception with a descriptive
-     * message indicating that the servlet is permanently
-     * unavailable.
+     * Constructs a new exception with a descriptive message indicating that the
+     * servlet is permanently unavailable.
      *
-     * @param msg a <code>String</code> specifying the
-     *            descriptive message
+     * @param msg
+     *            a <code>String</code> specifying the descriptive message
      */
     public UnavailableException(String msg) {
         super(msg);
+        seconds = 0;
         servlet = null;
         permanent = true;
-        seconds = -1;
     }
 
     /**
-     * Constructs a new exception with a descriptive message
-     * indicating that the servlet is temporarily unavailable
-     * and giving an estimate of how long it will be unavailable.
-     * <p/>
-     * <p>In some cases, the servlet cannot make an estimate. For
-     * example, the servlet might know that a server it needs is
-     * not running, but not be able to report how long it will take
-     * to be restored to functionality. This can be indicated with
-     * a negative or zero value for the <code>seconds</code> argument.
+     * Constructs a new exception with a descriptive message indicating that the
+     * servlet is temporarily unavailable and giving an estimate of how long it
+     * will be unavailable.
+     * <p>
+     * In some cases, the servlet cannot make an estimate. For example, the
+     * servlet might know that a server it needs is not running, but not be able
+     * to report how long it will take to be restored to functionality. This can
+     * be indicated with a negative or zero value for the <code>seconds</code>
+     * argument.
      *
-     * @param msg     a <code>String</code> specifying the
-     *                descriptive message, which can be written
-     *                to a log file or displayed for the user.
-     * @param seconds an integer specifying the number of seconds
-     *                the servlet expects to be unavailable; if
-     *                zero or negative, indicates that the servlet
-     *                can't make an estimate
+     * @param msg
+     *            a <code>String</code> specifying the descriptive message,
+     *            which can be written to a log file or displayed for the user.
+     * @param seconds
+     *            an integer specifying the number of seconds the servlet
+     *            expects to be unavailable; if zero or negative, indicates that
+     *            the servlet can't make an estimate
      */
     public UnavailableException(String msg, int seconds) {
         super(msg);
-        servlet = null;
+
         if (seconds <= 0)
             this.seconds = -1;
         else
             this.seconds = seconds;
-
+        servlet = null;
         permanent = false;
     }
 
     /**
-     * Returns a <code>boolean</code> indicating
-     * whether the servlet is permanently unavailable.
-     * If so, something is wrong with the servlet, and the
-     * system administrator must take some corrective action.
+     * Returns a <code>boolean</code> indicating whether the servlet is
+     * permanently unavailable. If so, something is wrong with the servlet, and
+     * the system administrator must take some corrective action.
      *
-     * @return        <code>true</code> if the servlet is
-     * permanently unavailable; <code>false</code>
-     * if the servlet is available or temporarily
-     * unavailable
+     * @return <code>true</code> if the servlet is permanently unavailable;
+     *         <code>false</code> if the servlet is available or temporarily
+     *         unavailable
      */
     public boolean isPermanent() {
         return permanent;
     }
 
     /**
-     * @deprecated As of Java Servlet API 2.2, with no replacement.
-     * <p/>
      * Returns the servlet that is reporting its unavailability.
-     * @return the <code>Servlet</code> object that is
-     * throwing the <code>UnavailableException</code>
+     *
+     * @return the <code>Servlet</code> object that is throwing the
+     *         <code>UnavailableException</code>
+     * @deprecated As of Java Servlet API 2.2, with no replacement.
      */
+    @Deprecated
     public Servlet getServlet() {
         return servlet;
     }
 
     /**
-     * Returns the number of seconds the servlet expects to
-     * be temporarily unavailable.
-     * <p/>
-     * <p>If this method returns a negative number, the servlet
-     * is permanently unavailable or cannot provide an estimate of
-     * how long it will be unavailable. No effort is
-     * made to correct for the time elapsed since the exception was
-     * first reported.
+     * Returns the number of seconds the servlet expects to be temporarily
+     * unavailable.
+     * <p>
+     * If this method returns a negative number, the servlet is permanently
+     * unavailable or cannot provide an estimate of how long it will be
+     * unavailable. No effort is made to correct for the time elapsed since the
+     * exception was first reported.
      *
-     * @return an integer specifying the number of seconds
-     * the servlet will be temporarily unavailable,
-     * or a negative number if the servlet is permanently
-     * unavailable or cannot make an estimate
+     * @return an integer specifying the number of seconds the servlet will be
+     *         temporarily unavailable, or a negative number if the servlet is
+     *         permanently unavailable or cannot make an estimate
      */
     public int getUnavailableSeconds() {
         return permanent ? -1 : seconds;
     }
-
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/WriteListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/WriteListener.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/WriteListener.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/WriteListener.java Sat May  4 21:29:39 2019
@@ -1,47 +1,45 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *     http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-package javax.servlet;
+package jakarta.servlet;
 
 import java.io.IOException;
-import java.util.EventListener;
 
 /**
- * Callback notification mechanism that signals to the developer it's possible to write content without blocking.
- * 
- * 
+ * Receives notification of write events when using non-blocking IO.
+ *
  * @since Servlet 3.1
  */
-public interface WriteListener extends EventListener {
+public interface WriteListener extends java.util.EventListener{
 
     /**
-     * Invoked when an error occurs writing data using the non-blocking APIs.
+     * Invoked when it it possible to write data without blocking. The container
+     * will invoke this method the first time for a request as soon as data can
+     * be written. Subsequent invocations will only occur if a call to
+     * {@link ServletOutputStream#isReady()} has returned false and it has since
+     * become possible to write data.
+     *
+     * @throws IOException if an I/O error occurs while processing this event
      */
-    void onError(Throwable t);
+    public void onWritePossible() throws IOException;
 
     /**
-     * When an instance of the WriteListener is registered with a ServletOutputStream, this method will be invoked by
-     * the container the first time when it is possible to write data. Subsequently the container will invoke this
-     * method if and only if ServletOutputStream.isReady() method has been called and has returned false.
-     * 
-     * @throws IOException
-     *             - if an I/O related error has occurred during processing
+     * Invoked if an error occurs while writing the response.
+     *
+     * @param throwable The throwable that represents the error that occurred
      */
-    void onWritePossible() throws IOException;
-}
+    public void onError(java.lang.Throwable throwable);
+}
\ No newline at end of file

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HandlesTypes.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HandlesTypes.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HandlesTypes.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HandlesTypes.java Sat May  4 21:29:39 2019
@@ -1,24 +1,20 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.annotation;
+package jakarta.servlet.annotation;
 
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -26,14 +22,18 @@ import java.lang.annotation.RetentionPol
 import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * This annotation is used to declare an array of application classes which are
+ * passed to a {@link javax.servlet.ServletContainerInitializer}.
+ *
+ * @since Servlet 3.0
  */
-
-@Target(value = ElementType.TYPE)
-@Retention(value = RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 public @interface HandlesTypes {
 
-    Class[] value();
+    /**
+     * @return array of classes
+     */
+    Class<?>[] value();
 
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpConstraint.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpConstraint.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpConstraint.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpConstraint.java Sat May  4 21:29:39 2019
@@ -1,41 +1,69 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.annotation;
+package jakarta.servlet.annotation;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
+import jakarta.servlet.annotation.ServletSecurity.EmptyRoleSemantic;
+import jakarta.servlet.annotation.ServletSecurity.TransportGuarantee;
+
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * This annotation represents the security constraints that are applied to all
+ * requests with HTTP protocol method types that are not otherwise represented
+ * by a corresponding {@link javax.servlet.annotation.HttpMethodConstraint} in a
+ * {@link javax.servlet.annotation.ServletSecurity} annotation.
+ *
+ * @since Servlet 3.0
  */
-
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface HttpConstraint {
 
+    /**
+     * The EmptyRoleSemantic determines the behaviour when the rolesAllowed list
+     * is empty.
+     *
+     * @return empty role semantic
+     */
+    EmptyRoleSemantic value() default EmptyRoleSemantic.PERMIT;
+
+    /**
+     * Determines whether SSL/TLS is required to process the current request.
+     *
+     * @return transport guarantee
+     */
+    TransportGuarantee transportGuarantee() default TransportGuarantee.NONE;
+
+    /**
+     * The authorized roles' names. The container may discard duplicate role
+     * names during processing of the annotation. N.B. The String "*" does not
+     * have a special meaning if it occurs as a role name.
+     *
+     * @return array of names. The array may be of zero length, in which case
+     *         the EmptyRoleSemantic applies; the returned value determines
+     *         whether access is to be permitted or denied regardless of the
+     *         identity and authentication state in either case, PERMIT or DENY.<br>
+     *         Otherwise, when the array contains one or more role names access
+     *         is permitted if the user a member of at least one of the named
+     *         roles. The EmptyRoleSemantic is not applied in this case.
+     *
+     */
     String[] rolesAllowed() default {};
 
-    ServletSecurity.TransportGuarantee transportGuarantee() default ServletSecurity.TransportGuarantee.NONE;
-
-    ServletSecurity.EmptyRoleSemantic value() default ServletSecurity.EmptyRoleSemantic.PERMIT;
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpMethodConstraint.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpMethodConstraint.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpMethodConstraint.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/HttpMethodConstraint.java Sat May  4 21:29:39 2019
@@ -1,47 +1,74 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.annotation;
+package jakarta.servlet.annotation;
 
 import java.lang.annotation.Documented;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
 
+import jakarta.servlet.annotation.ServletSecurity.EmptyRoleSemantic;
+import jakarta.servlet.annotation.ServletSecurity.TransportGuarantee;
+
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * Specific security constraints can be applied to different types of request,
+ * differentiated by the HTTP protocol method type by using this annotation
+ * inside the {@link javax.servlet.annotation.ServletSecurity} annotation.
+ *
+ * @since Servlet 3.0
+ *
  */
-
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface HttpMethodConstraint {
 
     /**
+     * HTTP Protocol method name (e.g. POST, PUT)
      *
-     * @return http method name
+     * @return method name
      */
     String value();
 
-    ServletSecurity.EmptyRoleSemantic emptyRoleSemantic() default ServletSecurity.EmptyRoleSemantic.PERMIT;
+    /**
+     * The EmptyRoleSemantic determines the behaviour when the rolesAllowed list
+     * is empty.
+     *
+     * @return empty role semantic
+     */
+    EmptyRoleSemantic emptyRoleSemantic() default EmptyRoleSemantic.PERMIT;
 
-    String[] rolesAllowed() default {};
+    /**
+     * Determines whether SSL/TLS is required to process the current request.
+     *
+     * @return transport guarantee
+     */
+    TransportGuarantee transportGuarantee() default TransportGuarantee.NONE;
 
-    ServletSecurity.TransportGuarantee transportGuarantee() default ServletSecurity.TransportGuarantee.NONE;
+    /**
+     * The authorized roles' names. The container may discard duplicate role
+     * names during processing of the annotation. N.B. The String "*" does not
+     * have a special meaning if it occurs as a role name.
+     *
+     * @return array of names. The array may be of zero length, in which case
+     *         the EmptyRoleSemantic applies; the returned value determines
+     *         whether access is to be permitted or denied regardless of the
+     *         identity and authentication state in either case, PERMIT or DENY.<br>
+     *         Otherwise, when the array contains one or more role names access
+     *         is permitted if the user a member of at least one of the named
+     *         roles. The EmptyRoleSemantic is not applied in this case.
+     */
+    String[] rolesAllowed() default {};
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/MultipartConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/MultipartConfig.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/MultipartConfig.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/MultipartConfig.java Sat May  4 21:29:39 2019
@@ -1,24 +1,20 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.annotation;
+package jakarta.servlet.annotation;
 
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
@@ -26,20 +22,47 @@ import java.lang.annotation.RetentionPol
 import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * This annotation is used to indicate that the {@link javax.servlet.Servlet} on
+ * which it is declared expects requests to made using the {@code
+ * multipart/form-data} MIME type. <br>
+ * <br>
+ *
+ * {@link javax.servlet.http.Part} components of a given {@code
+ * multipart/form-data} request are retrieved by a Servlet annotated with
+ * {@code MultipartConfig} by calling
+ * {@link javax.servlet.http.HttpServletRequest#getPart} or
+ * {@link javax.servlet.http.HttpServletRequest#getParts}.<br>
+ * <br>
+ *
+ * E.g. <code>@WebServlet("/upload")}</code><br>
+ *
+ * <code>@MultipartConfig()</code> <code>public class UploadServlet extends
+ * HttpServlet ... } </code><br>
+ *
+ * @since Servlet 3.0
  */
-
-@Target(value = ElementType.TYPE)
-@Retention(value = RetentionPolicy.RUNTIME)
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 public @interface MultipartConfig {
 
-    int fileSizeThreshold() default 0;
-
+    /**
+     * @return location in which the Container stores temporary files
+     */
     String location() default "";
 
+    /**
+     * @return the maximum size allowed for uploaded files (in bytes)
+     */
     long maxFileSize() default -1L;
 
+    /**
+     * @return the maximum size of the request allowed for {@code
+     *         multipart/form-data}
+     */
     long maxRequestSize() default -1L;
 
+    /**
+     * @return the size threshold at which the file will be written to the disk
+     */
+    int fileSizeThreshold() default 0;
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/ServletSecurity.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/ServletSecurity.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/ServletSecurity.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/ServletSecurity.java Sat May  4 21:29:39 2019
@@ -1,49 +1,90 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.annotation;
+package jakarta.servlet.annotation;
 
 import java.lang.annotation.Documented;
-import java.lang.annotation.Target;
 import java.lang.annotation.ElementType;
+import java.lang.annotation.Inherited;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Inherited;
+import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * Declare this annotation on a {@link javax.servlet.Servlet} implementation
+ * class to enforce security constraints on HTTP protocol requests.<br>
+ * The container applies constraints to the URL patterns mapped to each Servlet
+ * which declares this annotation.<br>
+ * <br>
+ *
+ * @since Servlet 3.0
  */
-
 @Inherited
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Target(value= ElementType.TYPE)
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface ServletSecurity {
 
-    enum EmptyRoleSemantic {PERMIT, DENY}
-
-    enum TransportGuarantee {NONE, CONFIDENTIAL}
-
-    HttpMethodConstraint[] httpMethodConstraints() default {};
-
+    /**
+     * Represents the two possible values of the empty role semantic, active
+     * when a list of role names is empty.
+     */
+    enum EmptyRoleSemantic {
+
+        /**
+         * Access MUST be permitted, regardless of authentication state or
+         * identity
+         */
+        PERMIT,
+
+        /**
+         * Access MUST be denied, regardless of authentication state or identity
+         */
+        DENY
+    }
+
+    /**
+     * Represents the two possible values of data transport, encrypted or not.
+     */
+    enum TransportGuarantee {
+
+        /**
+         * User data must not be encrypted by the container during transport
+         */
+        NONE,
+
+        /**
+         * The container MUST encrypt user data during transport
+         */
+        CONFIDENTIAL
+    }
+
+    /**
+     * The default constraint to apply to requests not handled by specific
+     * method constraints
+     *
+     * @return http constraint
+     */
     HttpConstraint value() default @HttpConstraint;
 
+    /**
+     * An array of HttpMethodConstraint objects to which the security constraint
+     * will be applied
+     *
+     * @return array of http method constraint
+     */
+    HttpMethodConstraint[] httpMethodConstraints() default {};
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebFilter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebFilter.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebFilter.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebFilter.java Sat May  4 21:29:39 2019
@@ -1,69 +1,122 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+package jakarta.servlet.annotation;
 
-
-package javax.servlet.annotation;
-
-import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
 
-import javax.servlet.DispatcherType;
+import jakarta.servlet.DispatcherType;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * The annotation used to declare a Servlet {@link javax.servlet.Filter}. <br>
+ * <br>
+ *
+ * This annotation will be processed by the container during deployment, the
+ * Filter class in which it is found will be created as per the configuration
+ * and applied to the URL patterns, {@link javax.servlet.Servlet}s and
+ * {@link javax.servlet.DispatcherType}s.<br>
+ * <br>
+ *
+ * If the name attribute is not defined, the fully qualified name of the class
+ * is used.<br>
+ * <br>
+ *
+ * At least one URL pattern MUST be declared in either the {@code value} or
+ * {@code urlPattern} attribute of the annotation, but not both.<br>
+ * <br>
+ *
+ * The {@code value} attribute is recommended for use when the URL pattern is
+ * the only attribute being set, otherwise the {@code urlPattern} attribute
+ * should be used.<br>
+ * <br>
+ *
+ * The annotated class MUST implement {@link javax.servlet.Filter}.
+ *
+ * E.g.
+ *
+ * <code>@WebFilter("/path/*")</code><br>
+ * <code>public class AnExampleFilter implements Filter { ... </code><br>
+ *
+ * @since Servlet 3.0 (Section 8.1.2)
+ *
  */
-
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Target(value= ElementType.TYPE)
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface WebFilter {
 
-    boolean asyncSupported() default false;
-
+    /**
+     * @return description of the Filter, if present
+     */
     String description() default "";
 
-    DispatcherType[] dispatcherTypes() default DispatcherType.REQUEST;
-
+    /**
+     * @return display name of the Filter, if present
+     */
     String displayName() default "";
 
+    /**
+     * @return array of initialization params for this Filter
+     */
+    WebInitParam[] initParams() default {};
+
+    /**
+     * @return name of the Filter, if present
+     */
     String filterName() default "";
 
-    WebInitParam[] initParams() default {};
+    /**
+     * @return small icon for this Filter, if present
+     */
+    String smallIcon() default "";
 
+    /**
+     * @return the large icon for this Filter, if present
+     */
     String largeIcon() default "";
 
+    /**
+     * @return array of Servlet names to which this Filter applies
+     */
     String[] servletNames() default {};
 
-    String smallIcon() default "";
-
-    String[] urlPatterns() default {};
-
+    /**
+     * A convenience method, to allow extremely simple annotation of a class.
+     *
+     * @return array of URL patterns
+     * @see #urlPatterns()
+     */
     String[] value() default {};
 
+    /**
+     * @return array of URL patterns to which this Filter applies
+     */
+    String[] urlPatterns() default {};
 
-
-
-
-
-
+    /**
+     * @return array of DispatcherTypes to which this filter applies
+     */
+    DispatcherType[] dispatcherTypes() default {DispatcherType.REQUEST};
+
+    /**
+     * @return asynchronous operation supported by this Filter
+     */
+    boolean asyncSupported() default false;
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebInitParam.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebInitParam.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebInitParam.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebInitParam.java Sat May  4 21:29:39 2019
@@ -1,44 +1,57 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+package jakarta.servlet.annotation;
 
-
-package javax.servlet.annotation;
-
-import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
+ * The annotation used to declare an initialization parameter on a
+ * {@link javax.servlet.Servlet} or {@link javax.servlet.Filter}, within a
+ * {@link javax.servlet.annotation.WebFilter} or
+ * {@link javax.servlet.annotation.WebServlet} annotation.<br>
+ * <br>
+ *
+ * E.g.
+ * <code>&amp;#064;WebServlet(name="TestServlet", urlPatterns={"/test"},initParams={&amp;#064;WebInitParam(name="test", value="true")})
+ * public class TestServlet extends HttpServlet { ... </code><br>
+ *
+ * @since Servlet 3.0
  */
-
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Target(value= ElementType.TYPE)
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface WebInitParam {
 
-    String description() default "";
-
+    /**
+     * @return name of the initialization parameter
+     */
     String name();
 
+    /**
+     * @return value of the initialization parameter
+     */
     String value();
-    
+
+    /**
+     * @return description of the initialization parameter
+     */
+    String description() default "";
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebListener.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebListener.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebListener.java Sat May  4 21:29:39 2019
@@ -1,40 +1,54 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+package jakarta.servlet.annotation;
 
-
-package javax.servlet.annotation;
-
-import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * The annotation used to declare a listener for various types of event, in a
+ * given web application context.<br>
+ * <br>
+ *
+ * The class annotated MUST implement one, (or more), of the following
+ * interfaces: {@link javax.servlet.http.HttpSessionAttributeListener},
+ * {@link javax.servlet.http.HttpSessionListener},
+ * {@link javax.servlet.ServletContextAttributeListener},
+ * {@link javax.servlet.ServletContextListener},
+ * {@link javax.servlet.ServletRequestAttributeListener},
+ * {@link javax.servlet.ServletRequestListener} or
+ * {@link javax.servlet.http.HttpSessionIdListener}
+ * <br>
+ *
+ * E.g. <code>@WebListener</code><br>
+ * <code>public TestListener implements ServletContextListener {</code><br>
+ *
+ * @since Servlet 3.0
  */
-
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Target(value= ElementType.TYPE)
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface WebListener {
 
+    /**
+     * @return description of the listener, if present
+     */
     String value() default "";
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebServlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebServlet.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebServlet.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/annotation/WebServlet.java Sat May  4 21:29:39 2019
@@ -1,59 +1,113 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
+package jakarta.servlet.annotation;
 
-
-package javax.servlet.annotation;
-
-import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
 import java.lang.annotation.ElementType;
 import java.lang.annotation.Retention;
 import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Documented;
+import java.lang.annotation.Target;
 
 /**
- * @version $Rev$ $Date$
- * @since 3.0
+ * This annotation is used to declare the configuration of an
+ * {@link javax.servlet.Servlet}. <br>
+ *
+ * If the name attribute is not defined, the fully qualified name of the class
+ * is used.<br>
+ * <br>
+ *
+ * At least one URL pattern MUST be declared in either the {@code value} or
+ * {@code urlPattern} attribute of the annotation, but not both.<br>
+ * <br>
+ *
+ * The {@code value} attribute is recommended for use when the URL pattern is
+ * the only attribute being set, otherwise the {@code urlPattern} attribute
+ * should be used.<br>
+ * <br>
+ *
+ * The class on which this annotation is declared MUST extend
+ * {@link javax.servlet.http.HttpServlet}. <br>
+ * <br>
+ *
+ * E.g. <code>@WebServlet("/path")}<br>
+ * public class TestServlet extends HttpServlet ... {</code><br>
+ *
+ * E.g.
+ * <code>@WebServlet(name="TestServlet", urlPatterns={"/path", "/alt"}) <br>
+ * public class TestServlet extends HttpServlet ... {</code><br>
+ *
+ * @since Servlet 3.0 (Section 8.1.1)
+ *
  */
-
+@Target(ElementType.TYPE)
+@Retention(RetentionPolicy.RUNTIME)
 @Documented
-@Target(value= ElementType.TYPE)
-@Retention(value= RetentionPolicy.RUNTIME)
 public @interface WebServlet {
 
-    boolean asyncSupported() default false;
-
-    String description() default "";
-
-    String displayName() default "";
+    /**
+     * @return name of the Servlet
+     */
+    String name() default "";
 
-    WebInitParam[] initParams() default {};
+    /**
+     * A convenience method, to allow extremely simple annotation of a class.
+     *
+     * @return array of URL patterns
+     * @see #urlPatterns()
+     */
+    String[] value() default {};
 
-    String largeIcon() default "";
+    /**
+     * @return array of URL patterns to which this Filter applies
+     */
+    String[] urlPatterns() default {};
 
+    /**
+     * @return load on startup ordering hint
+     */
     int loadOnStartup() default -1;
 
-    String name() default "";
+    /**
+     * @return array of initialization params for this Servlet
+     */
+    WebInitParam[] initParams() default {};
 
+    /**
+     * @return asynchronous operation supported by this Servlet
+     */
+    boolean asyncSupported() default false;
+
+    /**
+     * @return small icon for this Servlet, if present
+     */
     String smallIcon() default "";
 
-    String[] urlPatterns() default {};
+    /**
+     * @return large icon for this Servlet, if present
+     */
+    String largeIcon() default "";
 
-    String[] value() default {};
+    /**
+     * @return description of this Servlet, if present
+     */
+    String description() default "";
 
+    /**
+     * @return display name of this Servlet, if present
+     */
+    String displayName() default "";
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspConfigDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspConfigDescriptor.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspConfigDescriptor.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspConfigDescriptor.java Sat May  4 21:29:39 2019
@@ -1,34 +1,28 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.descriptor;
+package jakarta.servlet.descriptor;
 
 import java.util.Collection;
 
 /**
- * @version $Rev$ $Date$
  * @since Servlet 3.0
+ * TODO SERVLET3 - Add comments
  */
 public interface JspConfigDescriptor {
-
-    Collection<JspPropertyGroupDescriptor> getJspPropertyGroups();
-
-    Collection<TaglibDescriptor> getTaglibs();
+    public Collection<TaglibDescriptor> getTaglibs();
+    public Collection<JspPropertyGroupDescriptor> getJspPropertyGroups();
 }

Modified: geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java
URL: http://svn.apache.org/viewvc/geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java?rev=1858615&r1=1858614&r2=1858615&view=diff
==============================================================================
--- geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java (original)
+++ geronimo/specs/branches/jakarta/geronimo-jakarta-servlet_spec/src/main/java/jakarta/servlet/descriptor/JspPropertyGroupDescriptor.java Sat May  4 21:29:39 2019
@@ -1,55 +1,38 @@
 /*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements.  See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership.  The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License.  You may obtain a copy of the License at
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
  *
- *  http://www.apache.org/licenses/LICENSE-2.0
+ *      http://www.apache.org/licenses/LICENSE-2.0
  *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied.  See the License for the
- * specific language governing permissions and limitations
- * under the License.
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
  */
-
-
-package javax.servlet.descriptor;
+package jakarta.servlet.descriptor;
 
 import java.util.Collection;
 
 /**
- * @version $Rev$ $Date$
  * @since Servlet 3.0
+ * TODO SERVLET3 - Add comments
  */
 public interface JspPropertyGroupDescriptor {
-
-    String getBuffer();
-
-    String getDefaultContentType();
-
-    String getDeferredSyntaxAllowedAsLiteral();
-
-    String getElIgnored();
-
-    String getErrorOnUndeclaredNamespace();
-
-    Collection<String> getIncludeCodas();
-
-    Collection<String> getIncludePreludes();
-
-    String getIsXml();
-
-    String getPageEncoding();
-
-    String getScriptingInvalid();
-
-    String getTrimDirectiveWhitespaces();
-
-    Collection<String> getUrlPatterns();
-
+    public Collection<String> getUrlPatterns();
+    public String getElIgnored();
+    public String getPageEncoding();
+    public String getScriptingInvalid();
+    public String getIsXml();
+    public Collection<String> getIncludePreludes();
+    public Collection<String> getIncludeCodas();
+    public String getDeferredSyntaxAllowedAsLiteral();
+    public String getTrimDirectiveWhitespaces();
+    public String getDefaultContentType();
+    public String getBuffer();
+    public String getErrorOnUndeclaredNamespace();
 }



Mime
View raw message