提交 cc7902e1 authored 作者: Thomas Mueller's avatar Thomas Mueller

The Servlet API 3.0.1 is now used, instead of 2.4.

上级 b78c3058
...@@ -12,14 +12,24 @@ import java.sql.DriverManager; ...@@ -12,14 +12,24 @@ import java.sql.DriverManager;
import java.sql.SQLException; import java.sql.SQLException;
import java.sql.Statement; import java.sql.Statement;
import java.util.Enumeration; import java.util.Enumeration;
import java.util.EventListener;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map;
import java.util.Properties; import java.util.Properties;
import java.util.Set; import java.util.Set;
import javax.servlet.Filter;
import javax.servlet.FilterRegistration;
import javax.servlet.FilterRegistration.Dynamic;
import javax.servlet.RequestDispatcher; import javax.servlet.RequestDispatcher;
import javax.servlet.Servlet; import javax.servlet.Servlet;
import javax.servlet.ServletContext; import javax.servlet.ServletContext;
import javax.servlet.ServletContextEvent; import javax.servlet.ServletContextEvent;
import javax.servlet.ServletException;
import javax.servlet.ServletRegistration;
import javax.servlet.SessionCookieConfig;
import javax.servlet.SessionTrackingMode;
import javax.servlet.descriptor.JspConfigDescriptor;
import org.h2.api.ErrorCode; import org.h2.api.ErrorCode;
import org.h2.server.web.DbStarter; import org.h2.server.web.DbStarter;
...@@ -60,14 +70,10 @@ public class TestServlet extends TestBase { ...@@ -60,14 +70,10 @@ public class TestServlet extends TestBase {
return attributes.get(key); return attributes.get(key);
} }
/** @Override
* Set an initialization parameter. public boolean setInitParameter(String key, String value) {
*
* @param key the parameter key
* @param value the value
*/
void setInitParameter(String key, String value) {
initParams.setProperty(key, value); initParams.setProperty(key, value);
return true;
} }
@Override @Override
...@@ -76,7 +82,7 @@ public class TestServlet extends TestBase { ...@@ -76,7 +82,7 @@ public class TestServlet extends TestBase {
} }
@Override @Override
public Enumeration<Object> getAttributeNames() { public Enumeration<String> getAttributeNames() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
...@@ -86,7 +92,7 @@ public class TestServlet extends TestBase { ...@@ -86,7 +92,7 @@ public class TestServlet extends TestBase {
} }
@Override @Override
public Enumeration<Object> getInitParameterNames() { public Enumeration<String> getInitParameterNames() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
...@@ -131,7 +137,7 @@ public class TestServlet extends TestBase { ...@@ -131,7 +137,7 @@ public class TestServlet extends TestBase {
} }
@Override @Override
public Set<Object> getResourcePaths(String string) { public Set<String> getResourcePaths(String string) {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
...@@ -157,7 +163,7 @@ public class TestServlet extends TestBase { ...@@ -157,7 +163,7 @@ public class TestServlet extends TestBase {
* @deprecated as of servlet API 2.1 * @deprecated as of servlet API 2.1
*/ */
@Override @Override
public Enumeration<Object> getServletNames() { public Enumeration<String> getServletNames() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
...@@ -165,7 +171,7 @@ public class TestServlet extends TestBase { ...@@ -165,7 +171,7 @@ public class TestServlet extends TestBase {
* @deprecated as of servlet API 2.0 * @deprecated as of servlet API 2.0
*/ */
@Override @Override
public Enumeration<Object> getServlets() { public Enumeration<Servlet> getServlets() {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
...@@ -192,6 +198,144 @@ public class TestServlet extends TestBase { ...@@ -192,6 +198,144 @@ public class TestServlet extends TestBase {
throw new UnsupportedOperationException(); throw new UnsupportedOperationException();
} }
@Override
public Dynamic addFilter(String arg0, String arg1) {
throw new UnsupportedOperationException();
}
@Override
public Dynamic addFilter(String arg0, Filter arg1) {
throw new UnsupportedOperationException();
}
@Override
public Dynamic addFilter(String arg0, Class<? extends Filter> arg1) {
throw new UnsupportedOperationException();
}
@Override
public void addListener(String arg0) {
throw new UnsupportedOperationException();
}
@Override
public <T extends EventListener> void addListener(T arg0) {
throw new UnsupportedOperationException();
}
@Override
public void addListener(Class<? extends EventListener> arg0) {
throw new UnsupportedOperationException();
}
@Override
public javax.servlet.ServletRegistration.Dynamic addServlet(
String arg0, String arg1) {
throw new UnsupportedOperationException();
}
@Override
public javax.servlet.ServletRegistration.Dynamic addServlet(
String arg0, Servlet arg1) {
throw new UnsupportedOperationException();
}
@Override
public javax.servlet.ServletRegistration.Dynamic addServlet(
String arg0, Class<? extends Servlet> arg1) {
throw new UnsupportedOperationException();
}
@Override
public <T extends Filter> T createFilter(Class<T> arg0)
throws ServletException {
throw new UnsupportedOperationException();
}
@Override
public <T extends EventListener> T createListener(Class<T> arg0)
throws ServletException {
throw new UnsupportedOperationException();
}
@Override
public <T extends Servlet> T createServlet(Class<T> arg0)
throws ServletException {
throw new UnsupportedOperationException();
}
@Override
public void declareRoles(String... arg0) {
throw new UnsupportedOperationException();
}
@Override
public ClassLoader getClassLoader() {
throw new UnsupportedOperationException();
}
@Override
public String getContextPath() {
throw new UnsupportedOperationException();
}
@Override
public Set<SessionTrackingMode> getDefaultSessionTrackingModes() {
throw new UnsupportedOperationException();
}
@Override
public int getEffectiveMajorVersion() {
throw new UnsupportedOperationException();
}
@Override
public int getEffectiveMinorVersion() {
throw new UnsupportedOperationException();
}
@Override
public Set<SessionTrackingMode> getEffectiveSessionTrackingModes() {
throw new UnsupportedOperationException();
}
@Override
public FilterRegistration getFilterRegistration(String arg0) {
throw new UnsupportedOperationException();
}
@Override
public Map<String, ? extends FilterRegistration> getFilterRegistrations() {
throw new UnsupportedOperationException();
}
@Override
public JspConfigDescriptor getJspConfigDescriptor() {
throw new UnsupportedOperationException();
}
@Override
public ServletRegistration getServletRegistration(String arg0) {
throw new UnsupportedOperationException();
}
@Override
public Map<String, ? extends ServletRegistration> getServletRegistrations() {
throw new UnsupportedOperationException();
}
@Override
public SessionCookieConfig getSessionCookieConfig() {
throw new UnsupportedOperationException();
}
@Override
public void setSessionTrackingModes(Set<SessionTrackingMode> arg0) {
throw new UnsupportedOperationException();
}
} }
@Override @Override
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论