You are viewing a plain text version of this content. The canonical link for it is here.
Posted to servletapi-dev@jakarta.apache.org by da...@apache.org on 2001/03/16 19:31:27 UTC
cvs commit: jakarta-servletapi/src/share/javax/servlet/http HttpSessionAttributeListener.java HttpServletRequest.java HttpSession.java HttpSessionBindingEvent.java HttpSessionAttributesListener.java
dannyc 01/03/16 10:31:26
Modified: src/share/javax/servlet Tag: SERVLET_23_JSP_12 Filter.java
ServletContext.java
ServletContextAttributeEvent.java
src/share/javax/servlet/http Tag: SERVLET_23_JSP_12
HttpServletRequest.java HttpSession.java
HttpSessionBindingEvent.java
Added: src/share/javax/servlet Tag: SERVLET_23_JSP_12
ServletContextAttributeListener.java
src/share/javax/servlet/http Tag: SERVLET_23_JSP_12
HttpSessionAttributeListener.java
Removed: src/share/javax/servlet Tag: SERVLET_23_JSP_12
ServletContextAttributesListener.java
src/share/javax/servlet/http Tag: SERVLET_23_JSP_12
HttpSessionAttributesListener.java
Log:
Made the following API changes as per the expert group in anticipation of the upcoming draft of 2.3.
Filter: removed getFilterConfig()
Filter: removed setFilterConfig(), added init() and destroy()
Listeners: renamed attribute Listener interfaces, updated javadoc links from event classes
ServletContext: added extra argument to getResourcePaths()
HttpSession: added new getServletContext() method
HttpServletRequest: fixed typo in CLIENT_CERT_AUTH static value
Revision Changes Path
No revision
No revision
1.1.2.5 +24 -10 jakarta-servletapi/src/share/javax/servlet/Attic/Filter.java
Index: Filter.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/Attic/Filter.java,v
retrieving revision 1.1.2.4
retrieving revision 1.1.2.5
diff -u -r1.1.2.4 -r1.1.2.5
--- Filter.java 2000/10/21 01:37:29 1.1.2.4
+++ Filter.java 2001/03/16 18:31:19 1.1.2.5
@@ -89,18 +89,18 @@
public interface Filter {
/**
- * The container calls this method when the Filter is instantiated and
- ** passes in a FilterConfig object. When the container is done with
- ** the Filter, it calls this method, passing in null.
+ * 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 setFilterConfig(FilterConfig filterConfig);
+ public void init(FilterConfig filterConfig);
- /**
- * Return the FilterConfig for this Filter.
- *
- */
- public FilterConfig getFilterConfig();
-
+
/**
* 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
@@ -118,6 +118,20 @@
** 5. Directly set headers on the response after invokation of the next entity in ther 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.
+ */
+
+ public void destroy();
+
}
1.1.1.1.4.5 +24 -5 jakarta-servletapi/src/share/javax/servlet/ServletContext.java
Index: ServletContext.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/ServletContext.java,v
retrieving revision 1.1.1.1.4.4
retrieving revision 1.1.1.1.4.5
diff -u -r1.1.1.1.4.4 -r1.1.1.1.4.5
--- ServletContext.java 2000/10/21 05:06:47 1.1.1.1.4.4
+++ ServletContext.java 2001/03/16 18:31:20 1.1.1.1.4.5
@@ -174,14 +174,33 @@
public String getMimeType(String file);
/**
- * Return all the paths to resources held in the web application. All paths are
- * java.lang.String objects, begin with a leading /, and are relative to the root
- * of the web application.
- *@return an immutable set containing the paths
+ * Returns a directory-like listing of all the paths to resources within the web application whose longest sub-path
+ * matches the supplied path argument. Paths indicating subdirectory paths end with a '/'. The returned paths are all
+ * relative to the root of the web application and have a leading '/'. For example, for a web application
+ * containing<br><br>
+
+ * /welcome.html<br>
+ * /catalog/index.html<br>
+ * /catalog/products.html<br>
+ * /catalog/offers/books.html<br>
+ * /catalog/offers/music.html<br>
+ * /customer/login.jsp<br>
+ * /WEB-INF/web.xml<br>
+ * /WEB-INF/classes/com.acme.OrderServlet.class,<br><br>
+ *
+ * getResourcePaths("/") returns {"/welcome.html", "/catalog/", "/customer/", "/WEB-INF/"}<br>
+ * getResourcePaths("/catalog/") returns {"/catalog/index.html", "/catalog/products.html", "/catalog/offers/"}.<br>
+
+
+
+ *@param the partial path used to match the resources, which must start with a /
+ *@return a Set containing the directory listing, or null if there are no resources in the web application whose path
+ * begins with the supplied path.
+
* @since Servlet 2.3
*/
- public Set getResourcePaths();
+ public Set getResourcePaths(String path);
1.1.2.3 +1 -1 jakarta-servletapi/src/share/javax/servlet/Attic/ServletContextAttributeEvent.java
Index: ServletContextAttributeEvent.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/Attic/ServletContextAttributeEvent.java,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -r1.1.2.2 -r1.1.2.3
--- ServletContextAttributeEvent.java 2000/10/13 22:44:54 1.1.2.2
+++ ServletContextAttributeEvent.java 2001/03/16 18:31:20 1.1.2.3
@@ -64,7 +64,7 @@
/**
* This is the event class for notifications about changes to the attributes of the
* servlet context of a web application.
- * @see ServletContextAttributesListener
+ * @see ServletContextAttributeListener
* @since v 2.3
*/
No revision
No revision
1.1.2.1 +21 -0 jakarta-servletapi/src/share/javax/servlet/Attic/ServletContextAttributeListener.java
No revision
No revision
1.1.1.1.4.8 +2 -2 jakarta-servletapi/src/share/javax/servlet/http/HttpServletRequest.java
Index: HttpServletRequest.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/http/HttpServletRequest.java,v
retrieving revision 1.1.1.1.4.7
retrieving revision 1.1.1.1.4.8
diff -u -r1.1.1.1.4.7 -r1.1.1.1.4.8
--- HttpServletRequest.java 2000/10/20 20:44:01 1.1.1.1.4.7
+++ HttpServletRequest.java 2001/03/16 18:31:23 1.1.1.1.4.8
@@ -91,9 +91,9 @@
*/
public static final String FORM_AUTH = "FORM";
/**
- * String identifier for Basic authentication. Value "CERT-CLIENT"
+ * String identifier for Basic authentication. Value "CLIENT_CERT"
*/
- public static final String CLIENT_CERT_AUTH = "CERT-CLIENT";
+ public static final String CLIENT_CERT_AUTH = "CLIENT_CERT";
/**
* String identifier for Basic authentication. Value "DIGEST"
*/
1.1.1.1.4.6 +11 -1 jakarta-servletapi/src/share/javax/servlet/http/HttpSession.java
Index: HttpSession.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/http/HttpSession.java,v
retrieving revision 1.1.1.1.4.5
retrieving revision 1.1.1.1.4.6
diff -u -r1.1.1.1.4.5 -r1.1.1.1.4.6
--- HttpSession.java 2000/10/20 23:24:53 1.1.1.1.4.5
+++ HttpSession.java 2001/03/16 18:31:24 1.1.1.1.4.6
@@ -61,6 +61,7 @@
package javax.servlet.http;
import java.util.Enumeration;
+import javax.servlet.ServletContext;
/**
*
@@ -184,7 +185,16 @@
public long getLastAccessedTime();
-
+ /**
+ * Returns the ServletContext to which this session belongs.
+ *
+ * @return The ServletContext object for the web application
+ * @since 2.3
+ */
+
+ public ServletContext getServletContext();
+
+
/**
*
* Specifies the time, in seconds, between client requests before the
1.1.1.1.4.3 +2 -2 jakarta-servletapi/src/share/javax/servlet/http/HttpSessionBindingEvent.java
Index: HttpSessionBindingEvent.java
===================================================================
RCS file: /home/cvs/jakarta-servletapi/src/share/javax/servlet/http/HttpSessionBindingEvent.java,v
retrieving revision 1.1.1.1.4.2
retrieving revision 1.1.1.1.4.3
diff -u -r1.1.1.1.4.2 -r1.1.1.1.4.3
--- HttpSessionBindingEvent.java 2000/10/16 19:15:14 1.1.1.1.4.2
+++ HttpSessionBindingEvent.java 2001/03/16 18:31:25 1.1.1.1.4.3
@@ -68,7 +68,7 @@
*
* Either Sent to an object that implements
* {@link HttpSessionBindingListener} when it is bound or
- * unbound from a session, or to a {@link HttpSessionAttributesListener}
+ * unbound from a session, or to a {@link HttpSessionAttributeListener}
* that has been configured in the deploymewnt descriptor when any attribute is
* bound, unbound or replaced in a session.
*
@@ -83,7 +83,7 @@
* @since v2.3
* @see HttpSession
* @see HttpSessionBindingListener
- * @see HttpSessionAttributesListener
+ * @see HttpSessionAttributeListener
*/
public class HttpSessionBindingEvent extends HttpSessionEvent {
No revision
No revision
1.1.2.1 +80 -0 jakarta-servletapi/src/share/javax/servlet/http/Attic/HttpSessionAttributeListener.java