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/06/25 00:05:50 UTC
svn commit: r788194 [1/6] - in
/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet:
./ annotation/ annotation/jaxrs/ http/ http/annotation/
Author: djencks
Date: Wed Jun 24 22:05:48 2009
New Revision: 788194
URL: http://svn.apache.org/viewvc?rev=788194&view=rev
Log:
GERONIMO-4710 update servlet 3.0 spec to pfd
Added:
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/
- copied from r786616, geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/annotation/
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/HandlesTypes.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/MultipartConfig.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebFilter.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebInitParam.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebListener.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/WebServlet.java (with props)
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Part.java (with props)
Removed:
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/InitParam.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/Servlet.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/ServletContextListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/ServletFilter.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/annotation/jaxrs/
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/annotation/
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/AsyncListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/DispatcherType.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Filter.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterChain.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterConfig.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterRegistration.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/GenericServlet.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/RequestDispatcher.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Servlet.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletConfig.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/ServletContextAttributeEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContextAttributeListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContextEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContextListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletException.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletInputStream.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletOutputStream.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/ServletRequestAttributeEvent.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/ServletRequestEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletRequestListener.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/ServletResponse.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletResponseWrapper.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/SessionCookieConfig.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/SingleThreadModel.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/FilterMapping.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/Cookie.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServlet.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/HttpServletRequestWrapper.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletResponse.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpServletResponseWrapper.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSession.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionActivationListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionAttributeListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionBindingEvent.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionBindingListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpSessionContext.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/HttpSessionListener.java
geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/http/HttpUtils.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=788194&r1=788193&r2=788194&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 Wed Jun 24 22:05:48 2009
@@ -21,7 +21,7 @@
package javax.servlet;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
* @since 3.0
*/
public interface AsyncContext {
@@ -38,6 +38,8 @@
void dispatch(ServletContext servletContext, String path);
+ void dispatch(String path);
+
ServletRequest getRequest();
ServletResponse getResponse();
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=788194&r1=788193&r2=788194&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 Wed Jun 24 22:05:48 2009
@@ -21,14 +21,15 @@
package javax.servlet;
import java.util.EventListener;
+import java.io.IOException;
/**
- * @version $Rev:$ $Date:$
+ * @version $Rev$ $Date$
* @since 3.0
*/
public interface AsyncListener extends EventListener {
- void onComplete(AsyncEvent event);
+ void onComplete(AsyncEvent event) throws IOException;
- void onTimeout(AsyncEvent event);
+ void onTimeout(AsyncEvent event) throws IOException;
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/DispatcherType.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/DispatcherType.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/DispatcherType.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/DispatcherType.java Wed Jun 24 22:05:48 2009
@@ -26,9 +26,9 @@
*/
public enum DispatcherType {
+ ASYNC,
ERROR,
FORWARD,
INCLUDE,
- REQUEST,
- ASYNC
+ REQUEST
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Filter.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Filter.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Filter.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Filter.java Wed Jun 24 22:05:48 2009
@@ -21,74 +21,82 @@
import java.io.IOException;
- /**
- * A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.
- * <br><br>
- * Filters perform filtering in the <code>doFilter</code> method. Every Filter has access to
- ** a FilterConfig object from which it can obtain its initialization parameters, a
- ** reference to the ServletContext which it can use, for example, to load resources
- ** needed for filtering tasks.
- ** <p>
- ** Filters are configured in the deployment descriptor of a web application
- ** <p>
- ** Examples that have been identified for this design are<br>
- ** 1) Authentication Filters <br>
- ** 2) Logging and Auditing Filters <br>
- ** 3) Image conversion Filters <br>
- ** 4) Data compression Filters <br>
- ** 5) Encryption Filters <br>
- ** 6) Tokenizing Filters <br>
- ** 7) Filters that trigger resource access events <br>
- ** 8) XSL/T filters <br>
- ** 9) Mime-type chain Filter <br>
- * @since Servlet 2.3
- */
+/**
+ * A filter is an object that performs filtering tasks on either the request to a resource (a servlet or static content), or on the response from a resource, or both.
+ * <br><br>
+ * Filters perform filtering in the <code>doFilter</code> method. Every Filter has access to
+ * a FilterConfig object from which it can obtain its initialization parameters, a
+ * reference to the ServletContext which it can use, for example, to load resources
+ * needed for filtering tasks.
+ * <p/>
+ * Filters are configured in the deployment descriptor of a web application
+ * <p/>
+ * Examples that have been identified for this design are<br>
+ * 1) Authentication Filters <br>
+ * 2) Logging and Auditing Filters <br>
+ * 3) Image conversion Filters <br>
+ * 4) Data compression Filters <br>
+ * 5) Encryption Filters <br>
+ * 6) Tokenizing Filters <br>
+ * 7) Filters that trigger resource access events <br>
+ * 8) XSL/T filters <br>
+ * 9) Mime-type chain Filter <br>
+ *
+ * @since Servlet 2.3
+ */
public interface Filter {
- /**
- * Called by the web container to indicate to a filter that it is being placed into
- * service. The servlet container calls the init method exactly once after instantiating the
- * filter. The init method must complete successfully before the filter is asked to do any
- * filtering work. <br><br>
-
- * The web container cannot place the filter into service if the init method either<br>
- * 1.Throws a ServletException <br>
- * 2.Does not return within a time period defined by the web container
- */
- public void init(FilterConfig filterConfig) throws ServletException;
-
-
- /**
- * The <code>doFilter</code> method of the Filter is called by the container
- * each time a request/response pair is passed through the chain due
- * to a client request for a resource at the end of the chain. The FilterChain passed in to this
- * method allows the Filter to pass on the request and response to the next entity in the
- * chain.<p>
- * A typical implementation of this method would follow the following pattern:- <br>
- * 1. Examine the request<br>
- * 2. Optionally wrap the request object with a custom implementation to
- * filter content or headers for input filtering <br>
- * 3. Optionally wrap the response object with a custom implementation to
- * filter content or headers for output filtering <br>
- * 4. a) <strong>Either</strong> invoke the next entity in the chain using the FilterChain object (<code>chain.doFilter()</code>), <br>
- ** 4. b) <strong>or</strong> not pass on the request/response pair to the next entity in the filter chain to block the request processing<br>
- ** 5. Directly set headers on the response after invocation of the next entity in the filter chain.
- **/
- public void doFilter ( ServletRequest request, ServletResponse response, FilterChain chain ) throws IOException, ServletException;
-
- /**
- * Called by the web container to indicate to a filter that it is being taken out of service. This
- * method is only called once all threads within the filter's doFilter method have exited or after
- * a timeout period has passed. After the web container calls this method, it will not call the
- * doFilter method again on this instance of the filter. <br><br>
- *
- * This method gives the filter an opportunity to clean up any resources that are being held (for
- * example, memory, file handles, threads) and make sure that any persistent state is synchronized
- * with the filter's current state in memory.
- */
+ /**
+ * Called by the web container to indicate to a filter that it is being placed into
+ * service. The servlet container calls the init method exactly once after instantiating the
+ * filter. The init method must complete successfully before the filter is asked to do any
+ * filtering work. <br><br>
+ * <p/>
+ * The web container cannot place the filter into service if the init method either<br>
+ * 1.Throws a ServletException <br>
+ * 2.Does not return within a time period defined by the web container
+ * @param filterConfig Configuration for this filter
+ * @throws ServletException if the filter cannot initialize itself
+ */
+ public void init(FilterConfig filterConfig) throws ServletException;
+
+
+ /**
+ * The <code>doFilter</code> method of the Filter is called by the container
+ * each time a request/response pair is passed through the chain due
+ * to a client request for a resource at the end of the chain. The FilterChain passed in to this
+ * method allows the Filter to pass on the request and response to the next entity in the
+ * chain.<p>
+ * A typical implementation of this method would follow the following pattern:- <br>
+ * 1. Examine the request<br>
+ * 2. Optionally wrap the request object with a custom implementation to
+ * filter content or headers for input filtering <br>
+ * 3. Optionally wrap the response object with a custom implementation to
+ * filter content or headers for output filtering <br>
+ * 4. a) <strong>Either</strong> invoke the next entity in the chain using the FilterChain object (<code>chain.doFilter()</code>), <br>
+ * * 4. b) <strong>or</strong> not pass on the request/response pair to the next entity in the filter chain to block the request processing<br>
+ * * 5. Directly set headers on the response after invocation of the next entity in the filter chain.
+ * @param request servlet request to filter
+ * @param response servlet response to filter
+ * @param chain what to do next
+ * @throws java.io.IOException if there's an IO problem
+ * @throws ServletException if there is a non-IO problem
+ */
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException;
+
+ /**
+ * Called by the web container to indicate to a filter that it is being taken out of service. This
+ * method is only called once all threads within the filter's doFilter method have exited or after
+ * a timeout period has passed. After the web container calls this method, it will not call the
+ * doFilter method again on this instance of the filter. <br><br>
+ * <p/>
+ * This method gives the filter an opportunity to clean up any resources that are being held (for
+ * example, memory, file handles, threads) and make sure that any persistent state is synchronized
+ * with the filter's current state in memory.
+ */
- public void destroy();
+ public void destroy();
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterChain.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterChain.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterChain.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterChain.java Wed Jun 24 22:05:48 2009
@@ -21,29 +21,30 @@
import java.io.IOException;
- /**
- * A FilterChain is an object provided by the servlet container to the developer
- * giving a view into the invocation chain of a filtered request for a resource. Filters
- * use the FilterChain to invoke the next filter in the chain, or if the calling filter
- * is the last filter in the chain, to invoke the resource at the end of the chain.
- *
- * @see Filter
- * @since Servlet 2.3
- **/
+/**
+ * A FilterChain is an object provided by the servlet container to the developer
+ * giving a view into the invocation chain of a filtered request for a resource. Filters
+ * use the FilterChain to invoke the next filter in the chain, or if the calling filter
+ * is the last filter in the chain, to invoke the resource at the end of the chain.
+ *
+ * @see Filter
+ * @since Servlet 2.3
+ */
public interface FilterChain {
-
- /**
- * Causes the next filter in the chain to be invoked, or if the calling filter is the last filter
- * in the chain, causes the resource at the end of the chain to be invoked.
- *
- * @param request the request to pass along the chain.
- * @param response the response to pass along the chain.
- *
- * @since 2.3
- */
-
- public void doFilter ( ServletRequest request, ServletResponse response ) throws IOException, ServletException;
+
+ /**
+ * Causes the next filter in the chain to be invoked, or if the calling filter is the last filter
+ * in the chain, causes the resource at the end of the chain to be invoked.
+ *
+ * @param request the request to pass along the chain.
+ * @param response the response to pass along the chain.
+ * @since 2.3
+ * @throws java.io.IOException if there's an IO problem
+ * @throws ServletException if there is a non-IO problem
+ */
+
+ public void doFilter(ServletRequest request, ServletResponse response ) throws IOException, ServletException;
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterConfig.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterConfig.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterConfig.java Wed Jun 24 22:05:48 2009
@@ -21,71 +21,58 @@
import java.util.Enumeration;
- /**
- *
- * A filter configuration object used by a servlet container
- * to pass information to a filter during initialization.
- * @see Filter
- * @since Servlet 2.3
- *
- */
+/**
+ * A filter configuration object used by a servlet container
+ * to pass information to a filter during initialization.
+ *
+ * @since Servlet 2.3
+ * @see Filter
+ */
public interface FilterConfig {
- /**
- * Returns the filter-name of this filter as defined in the deployment descriptor.
- */
-
- public String getFilterName();
-
+ /**
+ * Returns the filter-name of this filter as defined in the deployment descriptor.
+ * @return the filter name as specified in the deployment descriptor
+ */
+ public String getFilterName();
- /**
+ /**
* Returns a reference to the {@link ServletContext} in which the caller
* is executing.
*
- *
- * @return a {@link ServletContext} object, used
- * by the caller to interact with its servlet
- * container
- *
- * @see ServletContext
- *
+ * @return a {@link ServletContext} object, used
+ * by the caller to interact with its servlet
+ * container
+ * @see ServletContext
*/
-
public ServletContext getServletContext();
-
+
/**
- * Returns a <code>String</code> containing the value of the
- * named initialization parameter, or <code>null</code> if
+ * Returns a <code>String</code> containing the value of the
+ * named initialization parameter, or <code>null</code> if
* the parameter does not exist.
*
- * @param name a <code>String</code> specifying the name
- * of the initialization parameter
- *
- * @return a <code>String</code> containing the value
- * of the initialization parameter
- *
+ * @param name a <code>String</code> specifying the name
+ * of the initialization parameter
+ * @return a <code>String</code> containing the value
+ * of the initialization parameter
*/
-
public String getInitParameter(String name);
/**
* Returns the names of the filter's initialization parameters
- * as an <code>Enumeration</code> of <code>String</code> objects,
+ * as an <code>Enumeration</code> of <code>String</code> objects,
* or an empty <code>Enumeration</code> if the filter has
* no initialization parameters.
*
- * @return an <code>Enumeration</code> of <code>String</code>
- * objects containing the names of the filter's
- * initialization parameters
- *
- *
- *
+ * @return an <code>Enumeration</code> of <code>String</code>
+ * objects containing the names of the filter's
+ * initialization parameters
*/
-
- public Enumeration getInitParameterNames();
+ public Enumeration<String> getInitParameterNames();
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterRegistration.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterRegistration.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterRegistration.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/FilterRegistration.java Wed Jun 24 22:05:48 2009
@@ -27,17 +27,14 @@
* @version $Rev$ $Date$
* @since 3.0
*/
-public interface FilterRegistration {
- boolean setDescription(String description);
- void setAsyncSupported(boolean asyncSupported);
+public interface FilterRegistration extends Registration {
void addMappingForServletNames(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... servletNames);
void addMappingForUrlPatterns(EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter, String ... urlPatterns);
- boolean setInitParameter(String name, String value);
-
- void setInitParameters(Map<String, String> initParameters);
+ public interface Dynamic extends FilterRegistration, Registration.Dynamic {
+ }
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/GenericServlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/GenericServlet.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/GenericServlet.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/GenericServlet.java Wed Jun 24 22:05:48 2009
@@ -23,305 +23,214 @@
import java.util.Enumeration;
/**
- *
* Defines a generic, protocol-independent
* servlet. To write an HTTP servlet for use on the
* Web, extend {@link javax.servlet.http.HttpServlet} instead.
- *
+ * <p/>
* <p><code>GenericServlet</code> implements the <code>Servlet</code>
* and <code>ServletConfig</code> interfaces. <code>GenericServlet</code>
* may be directly extended by a servlet, although it's more common to extend
* a protocol-specific subclass such as <code>HttpServlet</code>.
- *
+ * <p/>
* <p><code>GenericServlet</code> makes writing servlets
- * easier. It provides simple versions of the lifecycle methods
- * <code>init</code> and <code>destroy</code> and of the methods
+ * easier. It provides simple versions of the lifecycle methods
+ * <code>init</code> and <code>destroy</code> and of the methods
* in the <code>ServletConfig</code> interface. <code>GenericServlet</code>
* also implements the <code>log</code> method, declared in the
- * <code>ServletContext</code> interface.
- *
+ * <code>ServletContext</code> interface.
+ * <p/>
* <p>To write a generic servlet, you need only
- * override the abstract <code>service</code> method.
- *
- *
- * @author Various
- * @version $Version$
- *
- *
+ * override the abstract <code>service</code> method.
*
+ * @version $Rev$ $Date$
*/
-
-public abstract class GenericServlet
- implements Servlet, ServletConfig, java.io.Serializable
-{
+
+public abstract class GenericServlet implements Servlet, ServletConfig, java.io.Serializable {
private transient ServletConfig config;
-
/**
- *
* Does nothing. All of the servlet initialization
* is done by one of the <code>init</code> methods.
- *
*/
+ public GenericServlet() {
+ }
- public GenericServlet() { }
-
-
-
- /**
+ /**
* Called by the servlet container to indicate to a servlet that the
* servlet is being taken out of service. See {@link Servlet#destroy}.
- *
- *
*/
-
public void destroy() {
}
-
-
-
+
/**
* Returns a <code>String</code> containing the value of the named
* initialization parameter, or <code>null</code> if the parameter does
* not exist. See {@link ServletConfig#getInitParameter}.
- *
- * <p>This method is supplied for convenience. It gets the
- * value of the named parameter from the servlet's
+ * <p/>
+ * <p>This method is supplied for convenience. It gets the
+ * value of the named parameter from the servlet's
* <code>ServletConfig</code> object.
*
- * @param name a <code>String</code> specifying the name
- * of the initialization parameter
- *
- * @return String a <code>String</code> containing the value
- * of the initialization parameter
- *
- */
-
+ * @param name a <code>String</code> specifying the name
+ * of the initialization parameter
+ * @return String a <code>String</code> containing the value
+ * of the initialization parameter
+ */
public String getInitParameter(String name) {
- return getServletConfig().getInitParameter(name);
+ return getServletConfig().getInitParameter(name);
}
-
-
- /**
- * Returns the names of the servlet's initialization parameters
- * as an <code>Enumeration</code> of <code>String</code> objects,
- * or an empty <code>Enumeration</code> if the servlet has no
- * initialization parameters. See {@link
- * ServletConfig#getInitParameterNames}.
- *
- * <p>This method is supplied for convenience. It gets the
- * parameter names from the servlet's <code>ServletConfig</code> object.
- *
- *
- * @return Enumeration an enumeration of <code>String</code>
- * objects containing the names of
- * the servlet's initialization parameters
- *
- */
-
- public Enumeration getInitParameterNames() {
- return getServletConfig().getInitParameterNames();
- }
-
-
-
-
+ /**
+ * Returns the names of the servlet's initialization parameters
+ * as an <code>Enumeration</code> of <code>String</code> objects,
+ * or an empty <code>Enumeration</code> if the servlet has no
+ * initialization parameters. See {@link
+ * ServletConfig#getInitParameterNames}.
+ * <p/>
+ * <p>This method is supplied for convenience. It gets the
+ * parameter names from the servlet's <code>ServletConfig</code> object.
+ *
+ * @return Enumeration an enumeration of <code>String</code>
+ * objects containing the names of
+ * the servlet's initialization parameters
+ */
+ public Enumeration<String> getInitParameterNames() {
+ return getServletConfig().getInitParameterNames();
+ }
/**
* Returns this servlet's {@link ServletConfig} object.
*
- * @return ServletConfig the <code>ServletConfig</code> object
- * that initialized this servlet
- *
+ * @return ServletConfig the <code>ServletConfig</code> object
+ * that initialized this servlet
*/
-
public ServletConfig getServletConfig() {
- return config;
+ return config;
}
-
-
-
-
+
/**
* Returns a reference to the {@link ServletContext} in which this servlet
* is running. See {@link ServletConfig#getServletContext}.
- *
- * <p>This method is supplied for convenience. It gets the
+ * <p/>
+ * <p>This method is supplied for convenience. It gets the
* context from the servlet's <code>ServletConfig</code> object.
*
- *
- * @return ServletContext the <code>ServletContext</code> object
- * passed to this servlet by the <code>init</code>
- * method
- *
+ * @return ServletContext the <code>ServletContext</code> object
+ * passed to this servlet by the <code>init</code>
+ * method
*/
-
public ServletContext getServletContext() {
- return getServletConfig().getServletContext();
+ return getServletConfig().getServletContext();
}
-
-
-
-
/**
- * Returns information about the servlet, such as
- * author, version, and copyright.
+ * Returns information about the servlet, such as
+ * author, version, and copyright.
* By default, this method returns an empty string. Override this method
* to have it return a meaningful value. See {@link
* Servlet#getServletInfo}.
*
- *
- * @return String information about this servlet, by default an
- * empty string
- *
+ * @return String information about this servlet, by default an
+ * empty string
*/
-
public String getServletInfo() {
- return "";
+ return "";
}
-
-
-
/**
- *
* Called by the servlet container to indicate to a servlet that the
* servlet is being placed into service. See {@link Servlet#init}.
- *
+ * <p/>
* <p>This implementation stores the {@link ServletConfig}
* object it receives from the servlet container for later use.
- * When overriding this form of the method, call
+ * When overriding this form of the method, call
* <code>super.init(config)</code>.
*
- * @param config the <code>ServletConfig</code> object
- * that contains configutation
- * information for this servlet
- *
- * @exception ServletException if an exception occurs that
- * interrupts the servlet's normal
- * operation
- *
- *
- * @see UnavailableException
- *
+ * @param config the <code>ServletConfig</code> object
+ * that contains configutation
+ * information for this servlet
+ * @throws ServletException if an exception occurs that
+ * interrupts the servlet's normal
+ * operation
+ * @see UnavailableException
*/
-
public void init(ServletConfig config) throws ServletException {
- this.config = config;
- this.init();
+ this.config = config;
+ init();
}
-
-
-
-
/**
- *
* A convenience method which can be overridden so that there's no need
* to call <code>super.init(config)</code>.
- *
+ * <p/>
* <p>Instead of overriding {@link #init(ServletConfig)}, simply override
* this method and it will be called by
* <code>GenericServlet.init(ServletConfig config)</code>.
* The <code>ServletConfig</code> object can still be retrieved via {@link
- * #getServletConfig}.
- *
- * @exception ServletException if an exception occurs that
- * interrupts the servlet's
- * normal operation
+ * #getServletConfig}.
*
+ * @throws ServletException if an exception occurs that
+ * interrupts the servlet's
+ * normal operation
*/
-
public void init() throws ServletException {
-
}
-
-
-
/**
- *
* Writes the specified message to a servlet log file, prepended by the
* servlet's name. See {@link ServletContext#log(String)}.
*
- * @param msg a <code>String</code> specifying
- * the message to be written to the log file
- *
+ * @param msg a <code>String</code> specifying
+ * the message to be written to the log file
*/
-
public void log(String msg) {
- getServletContext().log(getServletName() + ": "+ msg);
+ getServletContext().log(getServletName() + ": " + msg);
}
-
-
-
-
+
/**
* Writes an explanatory message and a stack trace
* for a given <code>Throwable</code> exception
* to the servlet log file, prepended by the servlet's name.
* See {@link ServletContext#log(String, Throwable)}.
*
- *
- * @param message a <code>String</code> that describes
- * the error or exception
- *
- * @param t the <code>java.lang.Throwable</code> error
- * or exception
- *
- *
+ * @param message a <code>String</code> that describes
+ * the error or exception
+ * @param t the <code>java.lang.Throwable</code> error
+ * or exception
*/
-
public void log(String message, Throwable t) {
- getServletContext().log(getServletName() + ": " + message, t);
+ getServletContext().log(getServletName() + ": " + message, t);
}
-
-
-
+
/**
* Called by the servlet container to allow the servlet to respond to
* a request. See {@link Servlet#service}.
- *
- * <p>This method is declared abstract so subclasses, such as
+ * <p/>
+ * <p>This method is declared abstract so subclasses, such as
* <code>HttpServlet</code>, must override it.
*
- *
- *
- * @param req the <code>ServletRequest</code> object
- * that contains the client's request
- *
- * @param res the <code>ServletResponse</code> object
- * that will contain the servlet's response
- *
- * @exception ServletException if an exception occurs that
- * interferes with the servlet's
- * normal operation occurred
- *
- * @exception IOException if an input or output
- * exception occurs
- *
+ * @param req the <code>ServletRequest</code> object
+ * that contains the client's request
+ * @param res the <code>ServletResponse</code> object
+ * that will contain the servlet's response
+ * @throws ServletException if an exception occurs that
+ * interferes with the servlet's
+ * normal operation occurred
+ * @throws IOException if an input or output
+ * exception occurs
*/
-
- public abstract void service(ServletRequest req, ServletResponse res)
- throws ServletException, IOException;
-
-
+ public abstract void service(ServletRequest req, ServletResponse res) throws ServletException, IOException;
/**
* Returns the name of this servlet instance.
* See {@link ServletConfig#getServletName}.
*
- * @return the name of this servlet instance
- *
- *
- *
+ * @return the name of this servlet instance
*/
-
public String getServletName() {
return config.getServletName();
}
+
}
Added: 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=788194&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java (added)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java Wed Jun 24 22:05:48 2009
@@ -0,0 +1,41 @@
+/*
+ * 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;
+
+import java.util.Map;
+
+/**
+ * @version $Rev$ $Date$
+ * @since 3.0
+ */
+public interface Registration {
+ boolean setInitParameter(String name, String value);
+
+ void setInitParameters(Map<String, String> initParameters);
+
+ public interface Dynamic extends Registration {
+
+ void setAsyncSupported(boolean asyncSupported);
+
+ boolean setDescription(String description);
+
+ }
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Registration.java
------------------------------------------------------------------------------
svn:mime-type = text/plain
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/RequestDispatcher.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/RequestDispatcher.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/RequestDispatcher.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/RequestDispatcher.java Wed Jun 24 22:05:48 2009
@@ -21,115 +21,107 @@
import java.io.IOException;
-
/**
* Defines an object that receives requests from the client
- * and sends them to any resource (such as a servlet,
+ * and sends them to any resource (such as a servlet,
* HTML file, or JSP file) on the server. The servlet
* container creates the <code>RequestDispatcher</code> object,
* which is used as a wrapper around a server resource located
* at a particular path or given by a particular name.
- *
+ * <p/>
* <p>This interface is intended to wrap servlets,
* but a servlet container can create <code>RequestDispatcher</code>
* objects to wrap any type of resource.
*
- * @author Various
- * @version $Version$
- *
- * @see ServletContext#getRequestDispatcher(java.lang.String)
- * @see ServletContext#getNamedDispatcher(java.lang.String)
- * @see ServletRequest#getRequestDispatcher(java.lang.String)
- *
+ * @version $Rev$ $Date$
+ *
+ * @see ServletContext#getRequestDispatcher(java.lang.String)
+ * @see ServletContext#getNamedDispatcher(java.lang.String)
+ * @see ServletRequest#getRequestDispatcher(java.lang.String)
*/
-
-public interface RequestDispatcher {
-
-
-
-
-
-/**
- * Forwards a request from
- * a servlet to another resource (servlet, JSP file, or
- * HTML file) on the server. This method allows
- * one servlet to do preliminary processing of
- * a request and another resource to generate
- * the response.
- *
- * <p>For a <code>RequestDispatcher</code> obtained via
- * <code>getRequestDispatcher()</code>, the <code>ServletRequest</code>
- * object has its path elements and parameters adjusted to match
- * the path of the target resource.
- *
- * <p><code>forward</code> should be called before the response has been
- * committed to the client (before response body output has been flushed).
- * If the response already has been committed, this method throws
- * an <code>IllegalStateException</code>.
- * Uncommitted output in the response buffer is automatically cleared
- * before the forward.
- *
- * <p>The request and response parameters must be either the same
- * objects as were passed to the calling servlet's service method or be
- * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
- * that wrap them.
- *
- *
- * @param request a {@link ServletRequest} object
- * that represents the request the client
- * makes of the servlet
- *
- * @param response a {@link ServletResponse} object
- * that represents the response the servlet
- * returns to the client
- *
- * @exception ServletException if the target resource throws this exception
- *
- * @exception IOException if the target resource throws this exception
- *
- * @exception IllegalStateException if the response was already committed
- *
- */
-
- public void forward(ServletRequest request, ServletResponse response)
- throws ServletException, IOException;
-
+public interface RequestDispatcher {
+ //constants since 3.0
+
+ String ERROR_EXCEPTION = "javax.servlet.error.exception";
+ String ERROR_EXCEPTION_TYPE = "javax.servlet.error.exception_type";
+ String ERROR_MESSAGE = "javax.servlet.error.message";
+ String ERROR_REQUEST_URI = "javax.servlet.error.request_uri";
+ String ERROR_SERVLET_NAME = "javax.servlet.error.servlet_name";
+ String ERROR_STATUS_CODE = "javax.servlet.error.status_code";
+ String FORWARD_CONTEXT_PATH = "javax.servlet.forward.context_path";
+ String FORWARD_PATH_INFO = "javax.servlet.forward.path_info";
+ String FORWARD_QUERY_STRING = "javax.servlet.forward.query_string";
+ String FORWARD_REQUEST_URI = "javax.servlet.forward.request_uri";
+ String FORWARD_SERVLET_PATH = "javax.servlet.forward.servlet_path";
+ String INCLUDE_CONTEXT_PATH = "javax.servlet.include.context_path";
+ String INCLUDE_PATH_INFO = "javax.servlet.include.path_info";
+ String INCLUDE_QUERY_STRING = "javax.servlet.include.query_string";
+ String INCLUDE_REQUEST_URI = "javax.servlet.include.request_uri";
+ String INCLUDE_SERVLET_PATH = "javax.servlet.include.servlet_path";
/**
+ * Forwards a request from
+ * a servlet to another resource (servlet, JSP file, or
+ * HTML file) on the server. This method allows
+ * one servlet to do preliminary processing of
+ * a request and another resource to generate
+ * the response.
+ * <p/>
+ * <p>For a <code>RequestDispatcher</code> obtained via
+ * <code>getRequestDispatcher()</code>, the <code>ServletRequest</code>
+ * object has its path elements and parameters adjusted to match
+ * the path of the target resource.
+ * <p/>
+ * <p><code>forward</code> should be called before the response has been
+ * committed to the client (before response body output has been flushed).
+ * If the response already has been committed, this method throws
+ * an <code>IllegalStateException</code>.
+ * Uncommitted output in the response buffer is automatically cleared
+ * before the forward.
+ * <p/>
+ * <p>The request and response parameters must be either the same
+ * objects as were passed to the calling servlet's service method or be
+ * subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
+ * that wrap them.
*
+ * @param request a {@link ServletRequest} object
+ * that represents the request the client
+ * makes of the servlet
+ * @param response a {@link ServletResponse} object
+ * that represents the response the servlet
+ * returns to the client
+ * @throws ServletException if the target resource throws this exception
+ * @throws IOException if the target resource throws this exception
+ * @throws IllegalStateException if the response was already committed
+ */
+ public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException;
+
+ /**
* Includes the content of a resource (servlet, JSP page,
- * HTML file) in the response. In essence, this method enables
+ * HTML file) in the response. In essence, this method enables
* programmatic server-side includes.
- *
+ * <p/>
* <p>The {@link ServletResponse} object has its path elements
* and parameters remain unchanged from the caller's. The included
* servlet cannot change the response status code or set headers;
* any attempt to make a change is ignored.
- *
+ * <p/>
* <p>The request and response parameters must be either the same
* objects as were passed to the calling servlet's service method or be
* subclasses of the {@link ServletRequestWrapper} or {@link ServletResponseWrapper} classes
* that wrap them.
- *
- *
- *
- * @param request a {@link ServletRequest} object
- * that contains the client's request
- *
- * @param response a {@link ServletResponse} object
- * that contains the servlet's response
- *
- * @exception ServletException if the included resource throws this exception
- *
- * @exception IOException if the included resource throws this exception
- *
*
+ * @param request a {@link ServletRequest} object
+ * that contains the client's request
+ * @param response a {@link ServletResponse} object
+ * that contains the servlet's response
+ * @throws ServletException if the included resource throws this exception
+ * @throws IOException if the included resource throws this exception
*/
-
- public void include(ServletRequest request, ServletResponse response)
- throws ServletException, IOException;
+ public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException;
+
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Servlet.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Servlet.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Servlet.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/Servlet.java Wed Jun 24 22:05:48 2009
@@ -21,19 +21,18 @@
import java.io.IOException;
-
/**
* Defines methods that all servlets must implement.
- *
+ * <p/>
* <p>A servlet is a small Java program that runs within a Web server.
* Servlets receive and respond to requests from Web clients,
- * usually across HTTP, the HyperText Transfer Protocol.
- *
+ * usually across HTTP, the HyperText Transfer Protocol.
+ * <p/>
* <p>To implement this interface, you can write a generic servlet
* that extends
* <code>javax.servlet.GenericServlet</code> or an HTTP servlet that
* extends <code>javax.servlet.http.HttpServlet</code>.
- *
+ * <p/>
* <p>This interface defines methods to initialize a servlet,
* to service requests, and to remove a servlet from the server.
* These are known as life-cycle methods and are called in the
@@ -41,36 +40,32 @@
* <ol>
* <li>The servlet is constructed, then initialized with the <code>init</code> method.
* <li>Any calls from clients to the <code>service</code> method are handled.
- * <li>The servlet is taken out of service, then destroyed with the
+ * <li>The servlet is taken out of service, then destroyed with the
* <code>destroy</code> method, then garbage collected and finalized.
* </ol>
- *
+ * <p/>
* <p>In addition to the life-cycle methods, this interface
- * provides the <code>getServletConfig</code> method, which the servlet
+ * provides the <code>getServletConfig</code> method, which the servlet
* can use to get any startup information, and the <code>getServletInfo</code>
* method, which allows the servlet to return basic information about itself,
* such as author, version, and copyright.
*
- * @author Various
- * @version $Version$
- *
- * @see GenericServlet
- * @see javax.servlet.http.HttpServlet
- *
+ * @version $Rev$ $Date$
+ * @see GenericServlet
+ * @see javax.servlet.http.HttpServlet
*/
-
public interface Servlet {
/**
- * Called by the servlet container to indicate to a servlet that the
+ * Called by the servlet container to indicate to a servlet that the
* servlet is being placed into service.
- *
+ * <p/>
* <p>The servlet container calls the <code>init</code>
* method exactly once after instantiating the servlet.
* The <code>init</code> method must complete successfully
* before the servlet can receive any requests.
- *
+ * <p/>
* <p>The servlet container cannot place the servlet into service
* if the <code>init</code> method
* <ol>
@@ -78,118 +73,89 @@
* <li>Does not return within a time period defined by the Web server
* </ol>
*
- *
- * @param config a <code>ServletConfig</code> object
- * containing the servlet's
- * configuration and initialization parameters
- *
- * @exception ServletException if an exception has occurred that
- * interferes with the servlet's normal
- * operation
- *
- * @see UnavailableException
- * @see #getServletConfig
- *
+ * @param config a <code>ServletConfig</code> object
+ * containing the servlet's
+ * configuration and initialization parameters
+ * @throws ServletException if an exception has occurred that
+ * interferes with the servlet's normal
+ * operation
+ * @see UnavailableException
+ * @see #getServletConfig
*/
-
public void init(ServletConfig config) throws ServletException;
-
-
/**
- *
* Returns a {@link ServletConfig} object, which contains
* initialization and startup parameters for this servlet.
- * The <code>ServletConfig</code> object returned is the one
- * passed to the <code>init</code> method.
- *
- * <p>Implementations of this interface are responsible for storing the
- * <code>ServletConfig</code> object so that this
+ * The <code>ServletConfig</code> object returned is the one
+ * passed to the <code>init</code> method.
+ * <p/>
+ * <p>Implementations of this interface are responsible for storing the
+ * <code>ServletConfig</code> object so that this
* method can return it. The {@link GenericServlet}
* class, which implements this interface, already does this.
*
- * @return the <code>ServletConfig</code> object
- * that initializes this servlet
- *
- * @see #init
- *
+ * @return the <code>ServletConfig</code> object
+ * that initializes this servlet
+ * @see #init
*/
-
public ServletConfig getServletConfig();
-
-
/**
- * Called by the servlet container to allow the servlet to respond to
+ * Called by the servlet container to allow the servlet to respond to
* a request.
- *
+ * <p/>
* <p>This method is only called after the servlet's <code>init()</code>
* method has completed successfully.
- *
- * <p> The status code of the response always should be set for a servlet
+ * <p/>
+ * <p> The status code of the response always should be set for a servlet
* that throws or sends an error.
- *
- *
+ * <p/>
+ * <p/>
* <p>Servlets typically run inside multithreaded servlet containers
- * that can handle multiple requests concurrently. Developers must
+ * that can handle multiple requests concurrently. Developers must
* be aware to synchronize access to any shared resources such as files,
- * network connections, and as well as the servlet's class and instance
- * variables.
- * More information on multithreaded programming in Java is available in
+ * network connections, and as well as the servlet's class and instance
+ * variables.
+ * More information on multithreaded programming in Java is available in
* <a href="http://java.sun.com/Series/Tutorial/java/threads/multithreaded.html">
* the Java tutorial on multi-threaded programming</a>.
*
- *
- * @param req the <code>ServletRequest</code> object that contains
- * the client's request
- *
- * @param res the <code>ServletResponse</code> object that contains
- * the servlet's response
- *
- * @exception ServletException if an exception occurs that interferes
- * with the servlet's normal operation
- *
- * @exception IOException if an input or output exception occurs
- *
+ * @param req the <code>ServletRequest</code> object that contains
+ * the client's request
+ * @param res the <code>ServletResponse</code> object that contains
+ * the servlet's response
+ * @throws ServletException if an exception occurs that interferes
+ * with the servlet's normal operation
+ * @throws IOException if an input or output exception occurs
*/
-
- public void service(ServletRequest req, ServletResponse res)
- throws ServletException, IOException;
-
-
+ public void service(ServletRequest req, ServletResponse res) throws ServletException, IOException;
/**
* Returns information about the servlet, such
* as author, version, and copyright.
- *
+ * <p/>
* <p>The string that this method returns should
* be plain text and not markup of any kind (such as HTML, XML,
* etc.).
*
- * @return a <code>String</code> containing servlet information
- *
+ * @return a <code>String</code> containing servlet information
*/
-
public String getServletInfo();
-
-
/**
- *
* Called by the servlet container to indicate to a servlet that the
* servlet is being taken out of service. This method is
* only called once all threads within the servlet's
* <code>service</code> method have exited or after a timeout
- * period has passed. After the servlet container calls this
+ * period has passed. After the servlet container calls this
* method, it will not call the <code>service</code> method again
* on this servlet.
- *
- * <p>This method gives the servlet an opportunity
+ * <p/>
+ * <p>This method gives the servlet an opportunity
* to clean up any resources that are being held (for example, memory,
* file handles, threads) and make sure that any persistent state is
* synchronized with the servlet's current state in memory.
- *
*/
-
public void destroy();
}
Modified: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletConfig.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletConfig.java?rev=788194&r1=788193&r2=788194&view=diff
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletConfig.java (original)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletConfig.java Wed Jun 24 22:05:48 2009
@@ -21,17 +21,15 @@
import java.util.Enumeration;
-
-
/**
*
* A servlet configuration object used by a servlet container
* to pass information to a servlet during initialization.
*
+ * @version $Rev$ $Date$
*/
public interface ServletConfig {
-
/**
* Returns the name of this servlet instance.
@@ -40,26 +38,19 @@
* unnamed) servlet instance it will be the servlet's class name.
*
* @return the name of the servlet instance
- *
- *
- *
*/
-
public String getServletName();
/**
* Returns a reference to the {@link ServletContext} in which the caller
* is executing.
*
- *
* @return a {@link ServletContext} object, used
* by the caller to interact with its servlet
* container
*
* @see ServletContext
- *
*/
-
public ServletContext getServletContext();
/**
@@ -69,15 +60,11 @@
*
* @param name a <code>String</code> specifying the name
* of the initialization parameter
- *
- * @return a <code>String</code> containing the value
+ * @return a <code>String</code> containing the value
* of the initialization parameter
- *
*/
-
public String getInitParameter(String name);
-
/**
* Returns the names of the servlet's initialization parameters
* as an <code>Enumeration</code> of <code>String</code> objects,
@@ -87,12 +74,7 @@
* @return an <code>Enumeration</code> of <code>String</code>
* objects containing the names of the servlet's
* initialization parameters
- *
- *
- *
*/
-
- public Enumeration getInitParameterNames();
-
+ public Enumeration<String> getInitParameterNames();
}
Added: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java
URL: http://svn.apache.org/viewvc/geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java?rev=788194&view=auto
==============================================================================
--- geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java (added)
+++ geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java Wed Jun 24 22:05:48 2009
@@ -0,0 +1,33 @@
+/*
+ * 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;
+
+import java.util.Set;
+
+/**
+ * @version $Rev$ $Date$
+ * @since Servlet 3.0
+ */
+public interface ServletContainerInitializer {
+
+ void onStartup(Set<Class<?>> classes, ServletContext ctx);
+
+}
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java
------------------------------------------------------------------------------
svn:keywords = Date Revision
Propchange: geronimo/specs/trunk/geronimo-servlet_3.0_spec/src/main/java/javax/servlet/ServletContainerInitializer.java
------------------------------------------------------------------------------
svn:mime-type = text/plain