You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by dj...@apache.org on 2009/11/13 20:40:45 UTC
svn commit: r835965 - in
/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet:
./ annotation/ http/
Author: djencks
Date: Fri Nov 13 19:40:44 2009
New Revision: 835965
URL: http://svn.apache.org/viewvc?rev=835965&view=rev
Log:
make another pass through the javadoc
Modified:
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncContext.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRegistration.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequest.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestAttributeListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestWrapper.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletSecurityElement.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/UnavailableException.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletRequest.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncContext.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncContext.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncContext.java Fri Nov 13 19:40:44 2009
@@ -32,13 +32,19 @@
String ASYNC_REQUEST_URI = "javax.servlet.async.request_uri";
String ASYNC_SERVLET_PATH = "javax.servlet.async.servlet_path";
+ void addListener(AsyncListener listener) throws IllegalStateException;
+
+ void addListener(AsyncListener listener, ServletRequest request, ServletResponse response) throws IllegalStateException;
+
void complete();
- void dispatch();
+ <T extends AsyncListener> T createListener(Class<T> clazz) throws ServletException;
- void dispatch(ServletContext servletContext, String path);
+ void dispatch() throws IllegalStateException;
- void dispatch(String path);
+ void dispatch(ServletContext servletContext, String path) throws IllegalStateException;
+
+ void dispatch(String path) throws IllegalStateException;
ServletRequest getRequest();
@@ -46,5 +52,7 @@
boolean hasOriginalRequestAndResponse();
+ void setTimeout(long timeout) throws IllegalStateException;
+
void start(Runnable run);
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncEvent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncEvent.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncEvent.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncEvent.java Fri Nov 13 19:40:44 2009
@@ -21,24 +21,58 @@
package javax.servlet;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
* @since 3.0
*/
public class AsyncEvent {
+ private final AsyncContext context;
private final ServletRequest request;
private final ServletResponse response;
+ private final Throwable throwable;
- public AsyncEvent(ServletRequest request, ServletResponse response) {
+ public AsyncEvent(AsyncContext context) {
+ this.context = context;
+ this.request = null;
+ this.response = null;
+ this.throwable = null;
+ }
+
+ public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response) {
+ this.context = context;
+ this.request = request;
+ this.response = response;
+ this.throwable = null;
+ }
+
+
+ public AsyncEvent(AsyncContext context, ServletRequest request, ServletResponse response, Throwable throwable) {
+ this.context = context;
this.request = request;
this.response = response;
+ this.throwable = throwable;
}
- public ServletRequest getRequest() {
+ public AsyncEvent(AsyncContext context, Throwable throwable) {
+ this.context = context;
+ this.request = null;
+ this.response = null;
+ this.throwable = throwable;
+ }
+
+ public AsyncContext getContext() {
+ return context;
+ }
+
+ public ServletRequest getSuppliedRequest() {
return request;
}
- public ServletResponse getResponse() {
+ public ServletResponse getSuppliedResponse() {
return response;
}
+
+ public Throwable getThrowable() {
+ return throwable;
+ }
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncListener.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncListener.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/AsyncListener.java Fri Nov 13 19:40:44 2009
@@ -31,5 +31,9 @@
void onComplete(AsyncEvent event) throws IOException;
+ void onError(AsyncEvent event) throws IOException;
+
+ void onStartAsync(AsyncEvent event) throws IOException;
+
void onTimeout(AsyncEvent event) throws IOException;
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java Fri Nov 13 19:40:44 2009
@@ -73,7 +73,5 @@
void setAsyncSupported(boolean asyncSupported);
- void setDescription(String description);
-
}
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContext.java Fri Nov 13 19:40:44 2009
@@ -672,6 +672,13 @@
<T extends EventListener> T createListener(Class<T> clazz) throws ServletException;
/**
+ * declare the roles used in the web app as argumnents to isUserInRole
+ * @param roleNames the role names used in the web app
+ * @since Servlet 3.0
+ */
+ void declareRoles(String... roleNames);
+
+ /**
* @return configuration of session cookie
* @since 3.0
*/
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRegistration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRegistration.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRegistration.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRegistration.java Fri Nov 13 19:40:44 2009
@@ -20,6 +20,7 @@
package javax.servlet;
+import java.util.Collection;
import java.util.Set;
/**
@@ -35,7 +36,7 @@
*/
Set<String> addMapping(String... urlPatterns);
- Iterable<String> getMappings();
+ Collection<String> getMappings();
String getRunAsRole();
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequest.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequest.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequest.java Fri Nov 13 19:40:44 2009
@@ -43,32 +43,12 @@
public interface ServletRequest {
/**
- * @param listener async listener to add
- * @since Servlet 3.0
- */
- void addAsyncListener(AsyncListener listener);
-
- /**
- * @param listener async listener to add
- * @param request request for listener
- * @param response response for listener
- * @since Servlet 3.0
- */
- void addAsyncListener(AsyncListener listener, ServletRequest request, ServletResponse response);
-
- /**
* @return async context
* @since Servlet 3.0
*/
AsyncContext getAsyncContext();
/**
- * @since Servlet 3.0
- * @return async timeout in milliseconds
- */
- long getAsyncTimeout();
-
- /**
* Returns the value of the named attribute as an <code>Object</code>,
* or <code>null</code> if no attribute of the given name exists.
* <p/>
@@ -460,12 +440,6 @@
void removeAttribute(String name);
/**
- * @param timeout timeout in milliseconds
- * @since Servlet 3.0
- */
- void setAsyncTimeout(long timeout);
-
- /**
* Stores an attribute in this request.
* Attributes are reset between requests. This method is most
* often used in conjunction with {@link RequestDispatcher}.
@@ -501,7 +475,7 @@
/**
*
- * @return AsyncContext to control further work
+ * @return AsyncContext to control further work, initialized with the original request and response
* @since 3.0
*/
AsyncContext startAsync();
@@ -510,7 +484,7 @@
*
* @param request servlet request
* @param response servlet response
- * @return AsyncContext to control further work
+ * @return AsyncContext to control further work, initialized with the supplied request and response
* @since 3.0
*/
AsyncContext startAsync(ServletRequest request, ServletResponse response);
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestAttributeListener.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestAttributeListener.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestAttributeListener.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestAttributeListener.java Fri Nov 13 19:40:44 2009
@@ -39,18 +39,21 @@
/**
* Notification that a new attribute was added to the
* * servlet request. Called after the attribute is added.
+ * @param srae event for attribute added
*/
void attributeAdded(ServletRequestAttributeEvent srae);
/**
* Notification that an existing attribute has been removed from the
* * servlet request. Called after the attribute is removed.
+ * @param srae event for attribute removed
*/
void attributeRemoved(ServletRequestAttributeEvent srae);
/**
* Notification that an attribute was replaced on the
* * servlet request. Called after the attribute is replaced.
+ * @param srae event for attribute replaced
*/
void attributeReplaced(ServletRequestAttributeEvent srae);
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestWrapper.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestWrapper.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestWrapper.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestWrapper.java Fri Nov 13 19:40:44 2009
@@ -327,22 +327,10 @@
return this.request.getServletContext();
}
- public void addAsyncListener(AsyncListener listener) {
- this.request.addAsyncListener(listener);
- }
-
- public void addAsyncListener(AsyncListener listener, ServletRequest request, ServletResponse response) {
- this.request.addAsyncListener(listener, request, response);
- }
-
public AsyncContext getAsyncContext() {
return this.request.getAsyncContext();
}
- public long getAsyncTimeout() {
- return this.request.getAsyncTimeout();
- }
-
public boolean isAsyncStarted() {
return this.request.isAsyncStarted();
}
@@ -351,10 +339,6 @@
return this.request.isAsyncSupported();
}
- public void setAsyncTimeout(long timeout) {
- this.request.setAsyncTimeout(timeout);
- }
-
public AsyncContext startAsync() {
return this.request.startAsync();
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletSecurityElement.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletSecurityElement.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletSecurityElement.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletSecurityElement.java Fri Nov 13 19:40:44 2009
@@ -20,9 +20,54 @@
package javax.servlet;
+import java.util.Collection;
+import java.util.Collections;
+
+import javax.servlet.annotation.ServletSecurity;
+
/**
* @version $Rev$ $Date$
* @since 3.0
*/
-public class ServletSecurityElement {
+public class ServletSecurityElement extends HttpConstraintElement {
+
+ private final Collection<HttpMethodConstraintElement> httpMethodConstraints;
+
+ private final Collection<String> methodNames;
+
+ public ServletSecurityElement() {
+ httpMethodConstraints = Collections.emptySet();
+ methodNames = Collections.emptySet();
+ }
+
+ public ServletSecurityElement(HttpConstraintElement httpConstraintElement) {
+ super(httpConstraintElement.getEmptyRoleSemantic(), httpConstraintElement.getTransportGuarantee(), httpConstraintElement.getRolesAllowed());
+ httpMethodConstraints = Collections.emptySet();
+ methodNames = Collections.emptySet();
+ }
+
+ public ServletSecurityElement(Collection<HttpMethodConstraintElement> httpMethodConstraints) {
+ this.httpMethodConstraints = httpMethodConstraints;
+ this.methodNames = Collections.emptySet();
+ }
+
+ public ServletSecurityElement(HttpConstraintElement httpConstraintElement, Collection<HttpMethodConstraintElement> httpMethodConstraints) {
+ super(httpConstraintElement.getEmptyRoleSemantic(), httpConstraintElement.getTransportGuarantee(), httpConstraintElement.getRolesAllowed());
+ this.httpMethodConstraints = httpMethodConstraints;
+ this.methodNames = Collections.emptySet();
+ }
+
+ public ServletSecurityElement(ServletSecurity servletSecurity) {
+ super(servletSecurity.value().value(), servletSecurity.value().transportGuarantee(), servletSecurity.value().rolesAllowed());
+ httpMethodConstraints = Collections.emptySet();
+ methodNames = Collections.emptySet();
+ }
+
+ public Collection<HttpMethodConstraintElement> getHttpMethodConstraints() {
+ return httpMethodConstraints;
+ }
+
+ public Collection<String> getMethodNames() {
+ return methodNames;
+ }
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/UnavailableException.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/UnavailableException.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/UnavailableException.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/UnavailableException.java Fri Nov 13 19:40:44 2009
@@ -21,21 +21,21 @@
/**
* Defines an exception that a servlet or filter throws to indicate
- * that it is permanently or temporarily unavailable.
- *
+ * 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
* 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
+ * 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,
@@ -53,64 +53,54 @@
private final int seconds; // unavailability estimate
/**
- *
- * @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
- *
+ * @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.
*/
public UnavailableException(Servlet servlet, String msg) {
- super(msg);
- this.servlet = servlet;
- permanent = true;
+ super(msg);
+ this.servlet = servlet;
+ permanent = true;
seconds = -1;
}
-
+
/**
- * @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.
- *
+ * @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.
*/
public UnavailableException(int seconds, Servlet servlet, String msg) {
- super(msg);
- this.servlet = servlet;
- if (seconds <= 0)
- this.seconds = -1;
- else
- this.seconds = seconds;
- permanent = false;
+ super(msg);
+ this.servlet = servlet;
+ if (seconds <= 0)
+ this.seconds = -1;
+ else
+ this.seconds = seconds;
+ permanent = false;
}
/**
- *
* 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);
+ super(msg);
servlet = null;
- permanent = true;
+ permanent = true;
seconds = -1;
}
@@ -118,82 +108,75 @@
* 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.
*
- * @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);
+ super(msg);
servlet = null;
- if (seconds <= 0)
- this.seconds = -1;
- else
- this.seconds = seconds;
+ if (seconds <= 0)
+ this.seconds = -1;
+ else
+ this.seconds = seconds;
- permanent = false;
+ 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.
*
- * @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;
+ return permanent;
}
-
+
/**
- * @deprecated As of Java Servlet API 2.2, with no replacement.
- *
+ * @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>
*/
public Servlet getServlet() {
- return servlet;
+ return servlet;
}
/**
- * Returns the number of seconds the servlet expects to
- * be temporarily unavailable.
- *
+ * 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.
*
- * @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;
+ return permanent ? -1 : seconds;
}
-
+
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java Fri Nov 13 19:40:44 2009
@@ -40,6 +40,8 @@
String description() default "";
+ String displayName() default "";
+
WebInitParam[] initParams() default {};
String largeIcon() default "";
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletRequest.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletRequest.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletRequest.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletRequest.java Fri Nov 13 19:40:44 2009
@@ -513,11 +513,14 @@
* @param username username
* @param password password
* @since 3.0
+ * @throws javax.servlet.ServletException if username/password authentication not supported,
+ * if a user has already been established, or if authentication fails.
*/
void login(String username, String password) throws ServletException;
/**
* @since 3.0
+ * @throws javax.servlet.ServletException if logout fails
*/
void logout() throws ServletException;
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionEvent.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionEvent.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionEvent.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionEvent.java Fri Nov 13 19:40:44 2009
@@ -38,8 +38,8 @@
/**
* Return the session that changed.
*/
- public HttpSession getSession () {
- return (HttpSession) super.getSource();
+ public HttpSession getSession() {
+ return (HttpSession) super.getSource();
}
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.java Fri Nov 13 19:40:44 2009
@@ -29,9 +29,9 @@
/**
* @version $Rev$ $Date$
* @deprecated As of Java(tm) Servlet API 2.3.
- * These methods were only useful
- * with the default encoding and have been moved
- * to the request interfaces.
+ * These methods were only useful
+ * with the default encoding and have been moved
+ * to the request interfaces.
*/
@@ -70,10 +70,10 @@
* converted to ASCII characters.
*
* @param s a string containing the query to be parsed
+ * @return a <code>HashTable</code> object built
+ * from the parsed key-value pairs
* @throws IllegalArgumentException if the query string
* is invalid
- * @return a <code>HashTable</code> object built
- * from the parsed key-value pairs
*/
static public Hashtable<String, String[]> parseQueryString(String s) {
@@ -135,15 +135,15 @@
* @param in the <code>ServletInputStream</code>
* object that contains the data sent
* from the client
+ * @return a <code>HashTable</code> object built
+ * from the parsed key-value pairs
* @throws IllegalArgumentException if the data
* sent by the POST method is invalid
- * @return a <code>HashTable</code> object built
- * from the parsed key-value pairs
*/
static public Hashtable<String, String[]> parsePostData(int len,
- ServletInputStream in) {
+ ServletInputStream in) {
// XXX
// should a length of 0 be an IllegalArgumentException
@@ -243,7 +243,7 @@
* @param req a <code>HttpServletRequest</code> object
* containing the client's request
* @return a <code>StringBuffer</code> object containing
- * the reconstructed URL
+ * the reconstructed URL
*/
public static StringBuffer getRequestURL(HttpServletRequest req) {
StringBuffer url = new StringBuffer();
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java?rev=835965&r1=835964&r2=835965&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java Fri Nov 13 19:40:44 2009
@@ -20,8 +20,9 @@
package javax.servlet.http;
-import java.io.InputStream;
import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collection;
/**
* multipart/form-data part or form item
@@ -37,9 +38,9 @@
String getHeader(String headerName);
- Iterable<String> getHeaderNames();
+ Collection<String> getHeaderNames();
- Iterable<String> getHeaders(String headerName);
+ Collection<String> getHeaders(String headerName);
InputStream getInputStream() throws IOException;