Author: markt
Date: Fri Oct 9 12:58:48 2015
New Revision: 1707713
URL: http://svn.apache.org/viewvc?rev=1707713&view=rev
Log:
Update Servlet version to 4.0.
This adds some TODOs that require updated XSDs before they can be completed.
Modified:
tomcat/trunk/RELEASE-NOTES
tomcat/trunk/build.xml
tomcat/trunk/java/javax/servlet/ServletContext.java
tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
tomcat/trunk/java/org/apache/catalina/core/Constants.java
tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java
tomcat/trunk/res/META-INF/servlet-api.jar.manifest
tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java
tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
tomcat/trunk/webapps/docs/class-loader-howto.xml
tomcat/trunk/webapps/docs/funcspecs/fs-default.xml
tomcat/trunk/webapps/docs/index.xml
Modified: tomcat/trunk/RELEASE-NOTES
URL:
http://svn.apache.org/viewvc/tomcat/trunk/RELEASE-NOTES?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/RELEASE-NOTES (original)
+++ tomcat/trunk/RELEASE-NOTES Fri Oct 9 12:58:48 2015
@@ -77,7 +77,7 @@ for use by web applications (by placing
* jasper.jar (Jasper 2 Compiler and Runtime)
* jasper-el.jar (Jasper 2 EL implementation)
* jsp-api.jar (JSP 2.3 API)
-* servlet-api.jar (Servlet 3.1 API)
+* servlet-api.jar (Servlet 4.0 API)
* tomcat-api.jar (Interfaces shared by Catalina and Jasper)
* tomcat-coyote.jar (Tomcat connectors and utility classes)
* tomcat-dbcp.jar (package renamed database connection pool based on Commons
DBCP)
Modified: tomcat/trunk/build.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/build.xml?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/build.xml (original)
+++ tomcat/trunk/build.xml Fri Oct 9 12:58:48 2015
@@ -44,7 +44,7 @@
<property name="md5sum.binary-prefix" value=" *" />
<!-- Exact spec versions (for the manifests) -->
- <property name="servlet.revision" value="FR" />
+ <property name="servlet.revision" value="EDR-b01" />
<property name="jsp.revision" value="FR" />
<property name="el.revision" value="FR" />
<property name="websocket.revision" value="FR" />
@@ -706,7 +706,7 @@
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
- <!-- Servlet 3.1 Implementation JAR File -->
+ <!-- Servlet 4.0 Implementation JAR File -->
<jarIt jarfile="${servlet-api.jar}"
filesDir="${tomcat.classes}"
filesId="files.servlet-api"
@@ -1923,9 +1923,9 @@ Apache Tomcat ${version} native binaries
sourcepath="${tomcat.dist}/src/java"
destdir="${tomcat.dist}/webapps/docs/servletapi"
version="true"
- windowtitle="Servlet 3.1 API Documentation - Apache Tomcat ${version}"
- doctitle="Servlet 3.1 API - Apache Tomcat ${version}"
- header="<b>Servlet 3.1 - Apache Tomcat ${version}</b>"
+ windowtitle="Servlet 4.0 API Documentation - Apache Tomcat ${version}"
+ doctitle="Servlet 4.0 API - Apache Tomcat ${version}"
+ header="<b>Servlet 4.0 - Apache Tomcat ${version}</b>"
bottom="Copyright &#169; 2000-${year} Apache Software Foundation.
All Rights Reserved."
encoding="UTF-8"
docencoding="UTF-8"
@@ -2632,7 +2632,7 @@ skip.installer property in build.propert
filesId="files.annotations-api"
manifest="${tomcat.manifests}/annotations-api.jar.manifest" />
- <!-- Servlet 3.1 Implementation JAR File -->
+ <!-- Servlet 4.0 Implementation JAR File -->
<jarIt jarfile="${servlet-api-src.jar}"
filesDir="java"
filesId="files.servlet-api"
Modified: tomcat/trunk/java/javax/servlet/ServletContext.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/javax/servlet/ServletContext.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/java/javax/servlet/ServletContext.java (original)
+++ tomcat/trunk/java/javax/servlet/ServletContext.java Fri Oct 9 12:58:48 2015
@@ -90,19 +90,19 @@ public interface ServletContext {
/**
* Returns the major version of the Java Servlet API that this servlet
- * container supports. All implementations that comply with Version 3.1
must
- * have this method return the integer 3.
+ * container supports. All implementations that comply with Version 4.0
must
+ * have this method return the integer 4.
*
- * @return 3
+ * @return 4
*/
public int getMajorVersion();
/**
* Returns the minor version of the Servlet API that this servlet container
- * supports. All implementations that comply with Version 3.1 must have
this
- * method return the integer 1.
+ * supports. All implementations that comply with Version 4.0 must have
this
+ * method return the integer 0.
*
- * @return 1
+ * @return 0
*/
public int getMinorVersion();
Modified: tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/connector/CoyoteAdapter.java Fri Oct
9 12:58:48 2015
@@ -67,7 +67,7 @@ public class CoyoteAdapter implements Ad
// -------------------------------------------------------------- Constants
- private static final String POWERED_BY = "Servlet/3.1 JSP/2.3 " +
+ private static final String POWERED_BY = "Servlet/4.0 JSP/2.3 " +
"(" + ServerInfo.getServerInfo() + " Java/" +
System.getProperty("java.vm.vendor") + "/" +
System.getProperty("java.runtime.version") + ")";
Modified: tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java
(original)
+++ tomcat/trunk/java/org/apache/catalina/core/ApplicationContext.java Fri Oct
9 12:58:48 2015
@@ -324,25 +324,15 @@ public class ApplicationContext
}
- /**
- * Return the major version of the Java Servlet API that we implement.
- */
@Override
public int getMajorVersion() {
-
- return (Constants.MAJOR_VERSION);
-
+ return Constants.MAJOR_VERSION;
}
- /**
- * Return the minor version of the Java Servlet API that we implement.
- */
@Override
public int getMinorVersion() {
-
- return (Constants.MINOR_VERSION);
-
+ return Constants.MINOR_VERSION;
}
Modified: tomcat/trunk/java/org/apache/catalina/core/Constants.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/catalina/core/Constants.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/catalina/core/Constants.java (original)
+++ tomcat/trunk/java/org/apache/catalina/core/Constants.java Fri Oct 9
12:58:48 2015
@@ -14,17 +14,13 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
-
package org.apache.catalina.core;
-
public class Constants {
public static final String Package = "org.apache.catalina.core";
- public static final int MAJOR_VERSION = 3;
- public static final int MINOR_VERSION = 1;
+ public static final int MAJOR_VERSION = 4;
+ public static final int MINOR_VERSION = 0;
- public static final String JSP_SERVLET_CLASS =
- "org.apache.jasper.servlet.JspServlet";
+ public static final String JSP_SERVLET_CLASS =
"org.apache.jasper.servlet.JspServlet";
}
Modified: tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java
(original)
+++ tomcat/trunk/java/org/apache/tomcat/util/descriptor/web/WebXml.java Fri Oct
9 12:58:48 2015
@@ -154,6 +154,10 @@ public class WebXml {
majorVersion = 3;
minorVersion = 1;
break;
+ case "4.0":
+ majorVersion = 4;
+ minorVersion = 0;
+ break;
default:
log.warn(sm.getString("webXml.version.unknown", version));
}
@@ -205,9 +209,9 @@ public class WebXml {
}
// Derived major and minor version attributes
- // Default to 3.1 until we know otherwise
- private int majorVersion = 3;
- private int minorVersion = 1;
+ // Default to 4.0 until we know otherwise
+ private int majorVersion = 4;
+ private int minorVersion = 0;
public int getMajorVersion() { return majorVersion; }
public int getMinorVersion() { return minorVersion; }
@@ -676,6 +680,9 @@ public class WebXml {
} else if ("3.1".equals(version)) {
javaeeNamespace = XmlIdentifiers.JAVAEE_7_NS;
webXmlSchemaLocation = XmlIdentifiers.WEB_31_XSD;
+ } else if ("4.0".equals(version)) {
+ // TODO Servlet 4.0
+ throw new UnsupportedOperationException();
}
sb.append("<web-app xmlns=\"");
sb.append(javaeeNamespace);
Modified: tomcat/trunk/res/META-INF/servlet-api.jar.manifest
URL:
http://svn.apache.org/viewvc/tomcat/trunk/res/META-INF/servlet-api.jar.manifest?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/res/META-INF/servlet-api.jar.manifest (original)
+++ tomcat/trunk/res/META-INF/servlet-api.jar.manifest Fri Oct 9 12:58:48 2015
@@ -4,8 +4,8 @@ X-Compile-Target-JDK: @target.jdk@
Name: javax/servlet/
Specification-Title: Java API for Servlets
-Specification-Version: 3.1
+Specification-Version: 4.0
Specification-Vendor: Sun Microsystems, Inc.
Implementation-Title: javax.servlet
-Implementation-Version: [email protected]@
+Implementation-Version: [email protected]@
Implementation-Vendor: Apache Software Foundation
Modified: tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java
(original)
+++ tomcat/trunk/test/javax/servlet/resources/TestSchemaValidation.java Fri Oct
9 12:58:48 2015
@@ -129,4 +129,6 @@ public class TestSchemaValidation {
Assert.assertEquals(0, handler.getErrors().size());
Assert.assertEquals(0, handler.getWarnings().size());
}
+
+ // TODO Servlet 4.0
}
Modified:
tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java
(original)
+++ tomcat/trunk/test/org/apache/tomcat/util/descriptor/web/TestWebXml.java Fri
Oct 9 12:58:48 2015
@@ -130,6 +130,17 @@ public class TestWebXml {
}
@Test
+ public void testParseVersion40() {
+
+ WebXml webxml = new WebXml();
+
+ webxml.setVersion("4.0");
+ Assert.assertEquals(4, webxml.getMajorVersion());
+ Assert.assertEquals(0, webxml.getMinorVersion());
+ Assert.assertEquals("4.0", webxml.getVersion());
+ }
+
+ @Test
public void testValidateVersion22() throws IOException, SAXException {
doTestValidateVersion("2.2");
}
@@ -159,6 +170,8 @@ public class TestWebXml {
doTestValidateVersion("3.1");
}
+ // TODO Servlet 4.0
+
private void doTestValidateVersion(String version) throws IOException,
SAXException {
WebXml webxml = new WebXml();
Modified: tomcat/trunk/webapps/docs/class-loader-howto.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/class-loader-howto.xml?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/class-loader-howto.xml (original)
+++ tomcat/trunk/webapps/docs/class-loader-howto.xml Fri Oct 9 12:58:48 2015
@@ -143,7 +143,7 @@ loaders as it is initialized:</p>
<li><em>jasper.jar</em> — Tomcat Jasper JSP Compiler and
Runtime.</li>
<li><em>jasper-el.jar</em> — Tomcat Jasper EL implementation.</li>
<li><em>jsp-api.jar</em> — JSP 2.3 API.</li>
- <li><em>servlet-api.jar</em> — Servlet 3.1 API.</li>
+ <li><em>servlet-api.jar</em> — Servlet 4.0 API.</li>
<li><em>tomcat-api.jar</em> — Several interfaces defined by
Tomcat.</li>
<li><em>tomcat-coyote.jar</em> — Tomcat connectors and utility
classes.</li>
<li><em>tomcat-dbcp.jar</em> — Database connection pool
Modified: tomcat/trunk/webapps/docs/funcspecs/fs-default.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/funcspecs/fs-default.xml?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/funcspecs/fs-default.xml (original)
+++ tomcat/trunk/webapps/docs/funcspecs/fs-default.xml Fri Oct 9 12:58:48 2015
@@ -52,7 +52,7 @@
partially define the correct behavior of the default servlet:</p>
<ul>
<li><a
href="http://jcp.org/aboutJava/communityprocess/final/jsr340/index.html">
- Servlet Specification</a> (Version 3.1)</li>
+ Servlet Specification</a> (Version 4.0)</li>
<li><a href="http://www.rfc-editor.org/rfc/rfc2046.txt">Multipurpose
Internet Mail Extensions (MIME) Part Two: Media Types</a></li>
<li><a href="http://www.rfc-editor.org/rfc/rfc2616.txt">Hypertext
Modified: tomcat/trunk/webapps/docs/index.xml
URL:
http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/index.xml?rev=1707713&r1=1707712&r2=1707713&view=diff
==============================================================================
--- tomcat/trunk/webapps/docs/index.xml (original)
+++ tomcat/trunk/webapps/docs/index.xml Fri Oct 9 12:58:48 2015
@@ -35,7 +35,7 @@
<p>This is the top-level entry point of the documentation bundle for the
<strong>Apache Tomcat</strong> Servlet/JSP container. Apache Tomcat version
-<version-major-minor/> implements the Servlet 3.1 and JavaServer Pages 2.3
+<version-major-minor/> implements the Servlet 4.0 and JavaServer Pages 2.3
<a href="http://wiki.apache.org/tomcat/Specifications">specifications</a> from
the
<a href="http://www.jcp.org">Java Community Process</a>, and includes many
additional features that make it a useful platform for developing and deploying
@@ -166,6 +166,7 @@ are responsible for installing, configur
<strong>Specification</strong></a> and
<a
href="http://docs.oracle.com/javaee/7/api/javax/servlet/package-summary.html">
<strong>Javadoc</strong></a>
+ <p>TODO Servlet 4.0</p>
</li>
<li>JSP 2.3
<a
href="http://jcp.org/aboutJava/communityprocess/mrel/jsr245/index2.html">
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]