=====================================================
1. Update trunk with new API from Servlet Spec 3.0 PR
+ - Done
2. Provide NOOP implementations with TODO SRV3 markers so it will build
+ - Done
3. Implement all the new Servlet 3 features
# -----------------------------------------------------------------------------
# ----- Vesion Control Flags -----
-version.major=6
+version.major=7
version.minor=0
version.build=0
version.patch=0
--- /dev/null
+/*
+* 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;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public interface AsyncContext {
+ ServletRequest getRequest();
+ ServletResponse getResponse();
+ boolean hasOriginalRequestAndResponse();
+ void forward();
+ void forward(String path);
+ void forward(ServletContext context, String path);
+ void complete();
+ void start(Runnable run);
+}
--- /dev/null
+/*
+* 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;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public class AsyncEvent {
+ private ServletRequest request;
+ private ServletResponse response;
+
+ AsyncEvent(ServletRequest request, ServletResponse response) {
+ this.request = request;
+ this.response = response;
+ }
+
+ public ServletRequest getRequest() {
+ return request;
+ }
+
+ public ServletResponse getResponse() {
+ return response;
+ }
+}
--- /dev/null
+/*
+* 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.io.IOException;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public interface AsyncListener {
+ void onComplete(AsyncEvent event) throws IOException;
+ void onTimeout(AsyncEvent event) throws IOException;
+}
--- /dev/null
+/*
+* 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;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public enum DispatcherType {
+ FORWARD,
+ INCLUDE,
+ REQUEST,
+ ERROR
+}
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.EnumSet;
import java.util.Enumeration;
+import java.util.Map;
import java.util.Set;
/**
* Returns the major version of the Java Servlet API that this
* servlet container supports. All implementations that comply
- * with Version 2.4 must have this method
- * return the integer 2.
+ * with Version 3.0 must have this method
+ * return the integer 3.
*
- * @return 2
+ * @return 3
*
*/
/**
* Returns the minor version of the Servlet API that this
* servlet container supports. All implementations that comply
- * with Version 2.4 must have this method
- * return the integer 4.
+ * with Version 3.0 must have this method
+ * return the integer 0.
*
- * @return 4
+ * @return 0
*
*/
*/
public String getServletContextName();
+
+ /**
+ *
+ * @param servletName
+ * @param urlPatterns
+ * @since 3.0
+ */
+ public void addServletMapping(String servletName, String[] urlPatterns);
+
+ /**
+ *
+ * @param filterName
+ * @param description
+ * @param className
+ * @param initParameters
+ * @param isAsyncSupported
+ * @since 3.0
+ */
+ public void addFilter(String filterName, String description,
+ String className, Map<String,String> initParameters,
+ boolean isAsyncSupported);
+
+ /**
+ *
+ * @param filterName
+ * @param dispatcherTypes
+ * @param isMatchAfter
+ * @param servletNames
+ * @since 3.0
+ */
+ public void addFilterMappingForServletNames(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames);
+
+ /**
+ *
+ * @param filterName
+ * @param dispatcherTypes
+ * @param isMatchAfter
+ * @param urlPatterns
+ * @since 3.0
+ */
+ public void addFilterMappingForUrlPatterns(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns);
+
+ /**
+ *
+ * @param sessionCookieConfig
+ * @since 3.0
+ */
+ public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig);
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public SessionCookieConfig getSessionCookieConfig();
+
+ /**
+ *
+ * @param sessionTrackingModes
+ * @since 3.0
+ */
+ public void setSessionTrackingModes(
+ EnumSet<SessionTrackingMode> sessionTrackingModes);
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes();
}
*/
public int getLocalPort();
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public ServletContext getServletContext();
+
+ /**
+ *
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync() throws java.lang.IllegalStateException;
+
+ /**
+ *
+ * @param servletRequest
+ * @param servletResponse
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse)
+ throws java.lang.IllegalStateException;
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncStarted();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncSupported();
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public AsyncContext getAsyncContext();
+
+ /**
+ *
+ * @param listener
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener);
+
+ /**
+ *
+ * @param listener
+ * @param servletRequest
+ * @param servletResponse
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse);
+
+ /**
+ *
+ * @param timeout
+ * @since 3.0
+ */
+ public void setAsyncTimeout(long timeout);
}
public int getLocalPort(){
return this.request.getLocalPort();
}
+
+ /**
+ * The default behavior of this method is to return
+ * getServletContext() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public ServletContext getServletContext() {
+ return request.getServletContext();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * startAsync() on the wrapped request object.
+ *
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync() throws java.lang.IllegalStateException {
+ return request.startAsync();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * startAsync(ServletRequest, ServletResponse) on the wrapped request
+ * object.
+ *
+ * @param servletRequest
+ * @param servletResponse
+ * @return
+ * @throws java.lang.IllegalStateException
+ * @since 3.0
+ */
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse)
+ throws java.lang.IllegalStateException {
+ return request.startAsync(servletRequest, servletResponse);
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * isAsyncStarted() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncStarted() {
+ return request.isAsyncStarted();
+ }
+
+ /**
+ * The default behavior of this method is to return
+ * isAsyncSupported() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isAsyncSupported() {
+ return request.isAsyncSupported();
+ }
+ /**
+ * The default behavior of this method is to return
+ * getAsyncContext() on the wrapped request object.
+ *
+ * @return
+ * @since 3.0
+ */
+ public AsyncContext getAsyncContext() {
+ return request.getAsyncContext();
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * addAsyncListener(AsyncListener) on the wrapped request object.
+ *
+ * @param listener
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener) {
+ request.addAsyncListener(listener);
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * addAsyncListener(AsyncListener, ServletRequest, ServletResponse) on the
+ * wrapped request object.
+ *
+ * @param listener
+ * @param servletRequest
+ * @param servletResponse
+ * @since 3.0
+ */
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse) {
+ addAsyncListener(listener, servletRequest, servletResponse);
+ }
+
+ /**
+ * The default behavior of this method is to call
+ * startAsync() on the wrapped request object.
+ *
+ * @param timeout
+ * @since 3.0
+ */
+ public void setAsyncTimeout(long timeout) {
+ request.setAsyncTimeout(timeout);
+ }
+
}
--- /dev/null
+/*
+ * 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;
+
+/**
+ *
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public class SessionCookieConfig {
+ private String domain;
+ private String path;
+ private String comment;
+ private boolean isHttpOnly;
+ private boolean isSecure;
+
+ public SessionCookieConfig(String domain, String path, String comment,
+ boolean isHttpOnly, boolean isSecure) {
+ this.domain = domain;
+ this.path = path;
+ this.comment = comment;
+ this.isHttpOnly = isHttpOnly;
+ this.isSecure = isSecure;
+ }
+
+ public java.lang.String getDomain() {
+ return domain;
+ }
+
+ public java.lang.String getPath() {
+ return path;
+ }
+
+ public java.lang.String getComment() {
+ return comment;
+ }
+
+ public boolean isHttpOnly() {
+ return isHttpOnly;
+ }
+
+ public boolean isSecure() {
+ return isSecure;
+ }
+}
--- /dev/null
+/*
+* 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;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+public enum SessionTrackingMode {
+ COOKIE,
+ URL,
+ SSL
+}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface InitParam {
+ String name();
+ String value();
+ String description() default "";
+}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+import javax.servlet.DispatcherType;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface ServletFilter {
+ String description() default "";
+ String displayName() default "";
+ InitParam[] initParams() default {};
+ String filterName() default "";
+ String icon() default "";
+ String[] servletNames() default {};
+ String[] value() default {};
+ String[] urlPatterns() default {};
+ DispatcherType[] dispatcherTypes() default {DispatcherType.REQUEST};
+ boolean asyncSupported() default false;
+ long asyncTimeout() default 60000L;
+}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface WebServlet {
+ String name() default "";
+ String[] value() default {};
+ String[] urlPatterns() default {};
+ int loadOnStartup() default -1;
+ InitParam[] initParams() default {};
+ boolean asyncSupported() default false;
+ long asyncTimeout() default 60000L;
+ String icon() default "";
+ String description() default "";
+}
--- /dev/null
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package javax.servlet.annotation;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+import java.lang.annotation.Documented;
+
+/**
+ * @since 3.0
+ * $Id$
+ * TODO SERVLET3
+ */
+@Target({ElementType.TYPE})
+@Retention(RetentionPolicy.RUNTIME)
+@Documented
+public @interface WebServletContextListener {
+ String description() default "";
+}
import java.text.MessageFormat;
import java.util.ResourceBundle;
+import javax.servlet.DispatcherType;
+
/**
*
* Creates a cookie, a small amount of information sent by a servlet to
// Attributes encoded in the header's cookie fields.
//
- private String comment; // ;Comment=VALUE ... describes cookie's use
- // ;Discard ... implied by maxAge < 0
- private String domain; // ;Domain=VALUE ... domain that sees cookie
- private int maxAge = -1; // ;Max-Age=VALUE ... cookies auto-expire
- private String path; // ;Path=VALUE ... URLs that see the cookie
- private boolean secure; // ;Secure ... e.g. use SSL
- private int version = 0; // ;Version=1 ... means RFC 2109++ style
-
+ private String comment; // ;Comment=VALUE ... describes cookie's use
+ // ;Discard ... implied by maxAge < 0
+ private String domain; // ;Domain=VALUE ... domain that sees cookie
+ private int maxAge = -1; // ;Max-Age=VALUE ... cookies auto-expire
+ private String path; // ;Path=VALUE ... URLs that see the cookie
+ private boolean secure; // ;Secure ... e.g. use SSL
+ private int version = 0; // ;Version=1 ... means RFC 2109++ style
+ // TODO SERVLET3
+ private boolean httpOnly; // Not in the spec but supported by most browsers
/**
throw new RuntimeException(e.getMessage());
}
}
+
+ /**
+ *
+ * @return
+ * @since 3.0
+ */
+ public boolean isHttpOnly() {
+ return httpOnly;
+ }
+
+ /**
+ *
+ * @param httpOnly
+ * since 3.0
+ */
+ public void setHttpOnly(boolean httpOnly) {
+ this.httpOnly = httpOnly;
+ }
}
import java.util.TreeMap;
import javax.security.auth.Subject;
+import javax.servlet.AsyncContext;
+import javax.servlet.AsyncListener;
import javax.servlet.FilterChain;
import javax.servlet.RequestDispatcher;
import javax.servlet.ServletContext;
import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
import javax.servlet.ServletRequestAttributeEvent;
import javax.servlet.ServletRequestAttributeListener;
+import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
}
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse) {
+ // TODO SERVLET3
+ }
+
+ public void addAsyncListener(AsyncListener listener) {
+ // TODO SERVLET3
+ }
+
+ public AsyncContext getAsyncContext() {
+ // TODO SERVLET3
+ return null;
+ }
+
+ public ServletContext getServletContext() {
+ // TODO SERVLET3
+ return null;
+ }
+
+ public boolean isAsyncStarted() {
+ // TODO SERVLET3
+ return false;
+ }
+
+ public boolean isAsyncSupported() {
+ // TODO SERVLET3
+ return false;
+ }
+
+ public void setAsyncTimeout(long timeout) {
+ // TODO SERVLET3
+ }
+
+ public AsyncContext startAsync() throws IllegalStateException {
+ // TODO SERVLET3
+ return null;
+ }
+
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse) throws IllegalStateException {
+ // TODO SERVLET3
+ return null;
+ }
+
// ---------------------------------------------------- HttpRequest Methods
import java.util.Locale;
import java.util.Map;
+import javax.servlet.AsyncContext;
+import javax.servlet.AsyncListener;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
import javax.servlet.ServletInputStream;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
return request.getRemotePort();
}
+
+ public void addAsyncListener(AsyncListener listener,
+ ServletRequest servletRequest, ServletResponse servletResponse) {
+ // TODO SERVLET3
+ }
+
+
+ public void addAsyncListener(AsyncListener listener) {
+ // TODO SERVLET3
+ }
+
+
+ public AsyncContext getAsyncContext() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public ServletContext getServletContext() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public boolean isAsyncStarted() {
+ // TODO SERVLET3
+ return false;
+ }
+
+
+ public boolean isAsyncSupported() {
+ // TODO SERVLET3
+ return false;
+ }
+
+
+ public void setAsyncTimeout(long timeout) {
+ // TODO SERVLET3
+ }
+
+
+ public AsyncContext startAsync() throws IllegalStateException {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public AsyncContext startAsync(ServletRequest servletRequest,
+ ServletResponse servletResponse) throws IllegalStateException {
+ // TODO SERVLET3
+ return null;
+ }
+
}
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
+import java.util.EnumSet;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.Map;
import javax.naming.Binding;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
+import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletContextAttributeEvent;
import javax.servlet.ServletContextAttributeListener;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
import org.apache.catalina.Context;
import org.apache.catalina.Host;
}
+ public void addFilter(String filterName, String description,
+ String className, Map<String, String> initParameters,
+ boolean isAsyncSupported) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForServletNames(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForUrlPatterns(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public void addServletMapping(String servletName, String[] urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public SessionCookieConfig getSessionCookieConfig() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig) {
+ // TODO SERVLET3
+ }
+
+
+ public void setSessionTrackingModes(
+ EnumSet<SessionTrackingMode> sessionTrackingModes) {
+ // TODO SERVLET3
+ }
+
+
// -------------------------------------------------------- Package Methods
protected StandardContext getContext() {
return this.context;
import java.security.AccessController;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
+import java.util.EnumSet;
import java.util.Enumeration;
import java.util.HashMap;
+import java.util.Map;
import java.util.Set;
+import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
import org.apache.catalina.Globals;
import org.apache.catalina.security.SecurityUtil;
}
+ public void addFilter(String filterName, String description,
+ String className, Map<String, String> initParameters,
+ boolean isAsyncSupported) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForServletNames(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForUrlPatterns(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public void addServletMapping(String servletName, String[] urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public SessionCookieConfig getSessionCookieConfig() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig) {
+ // TODO SERVLET3
+ }
+
+
+ public void setSessionTrackingModes(
+ EnumSet<SessionTrackingMode> sessionTrackingModes) {
+ // TODO SERVLET3
+ }
+
+
/**
* Use reflection to invoke the requested method. Cache the method object
* to speed up the process
public class Constants {
public static final String Package = "org.apache.catalina.core";
- public static final int MAJOR_VERSION = 2;
- public static final int MINOR_VERSION = 5;
+ public static final int MAJOR_VERSION = 3;
+ public static final int MINOR_VERSION = 0;
public static final String JSP_SERVLET_CLASS =
"org.apache.jasper.servlet.JspServlet";
import java.util.Locale;
import java.util.Map;
+import javax.servlet.AsyncContext;
+import javax.servlet.AsyncListener;
import javax.servlet.FilterChain;
import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletContext;
import javax.servlet.ServletInputStream;
import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
public String getLocalName() { return null; }
public int getLocalPort() { return -1; }
public int getRemotePort() { return -1; }
-
+ public void addAsyncListener(AsyncListener listener, ServletRequest req,
+ ServletResponse res) {}
+ public void addAsyncListener(AsyncListener listener) {}
+ public AsyncContext getAsyncContext() { return null; }
+ public ServletContext getServletContext() { return null; }
+ public boolean isAsyncStarted() { return false; }
+ public boolean isAsyncSupported() { return false; }
+ public void setAsyncTimeout(long timeout) {}
+ public AsyncContext startAsync() throws IllegalStateException {
+ return null; }
+ public AsyncContext startAsync(ServletRequest req, ServletResponse res)
+ throws IllegalStateException { return null; }
}
import java.io.PrintWriter;
import java.net.MalformedURLException;
import java.net.URL;
+import java.util.EnumSet;
import java.util.Enumeration;
import java.util.HashSet;
import java.util.Hashtable;
+import java.util.Map;
import java.util.Set;
import java.util.Vector;
+import javax.servlet.DispatcherType;
import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet;
import javax.servlet.ServletContext;
import javax.servlet.ServletException;
+import javax.servlet.SessionCookieConfig;
+import javax.servlet.SessionTrackingMode;
/**
*/
public int getMajorVersion() {
- return (2);
+ return (3);
}
*/
public int getMinorVersion() {
- return (3);
+ return (0);
}
}
+ public void addFilter(String filterName, String description,
+ String className, Map<String, String> initParameters,
+ boolean isAsyncSupported) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForServletNames(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... servletNames) {
+ // TODO SERVLET3
+ }
+
+
+ public void addFilterMappingForUrlPatterns(String filterName,
+ EnumSet<DispatcherType> dispatcherTypes, boolean isMatchAfter,
+ String... urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public void addServletMapping(String servletName, String[] urlPatterns) {
+ // TODO SERVLET3
+ }
+
+
+ public EnumSet<SessionTrackingMode> getDefaultSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public EnumSet<SessionTrackingMode> getEffectiveSessionTrackingModes() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public SessionCookieConfig getSessionCookieConfig() {
+ // TODO SERVLET3
+ return null;
+ }
+
+
+ public void setSessionCookieConfig(SessionCookieConfig sessionCookieConfig) {
+ // TODO SERVLET3
+ }
+
+
+ public void setSessionTrackingModes(
+ EnumSet<SessionTrackingMode> sessionTrackingModes) {
+ // TODO SERVLET3
+ }
}