This is an automated email from the ASF dual-hosted git repository. jungm pushed a commit to branch ee11 in repository https://gitbox.apache.org/repos/asf/tomee-tck.git
commit b018cfc6f83a4ac151f635b3c8a20a5de254545a Author: Markus Jung <[email protected]> AuthorDate: Sat Jul 18 22:22:57 2026 +0200 Configure the Servlet TCK harness for cross-context, encoding, and trailers Enable real cross-context dispatch and the STRICT_SERVLET_COMPLIANCE subset through a conf/context.xml overlay, add allowedTrailerHeaders on the HTTP connector via a module-local server.xml, and strip TomEE's UTF-8 encoding pins while adding the ja->Shift_Jis locale mapping in the conf/web.xml overlay. The full baseline drops from 69 to 12 errors; the two remaining classes (pluggability RegistrationTests, spec DefaultMappingTests) fail because TomEE aborts context startup on a servlet/filter class the war does not package. --- KNOWN_ISSUES.md | 12 +- runner-standalone/README.md | 2 +- runner-standalone/exclusions/servlet.txt | 135 +++------------------ runner-standalone/servlet/pom.xml | 27 ++++- .../servlet/src/tomee-conf/context.xml | 45 +++++++ .../servlet/src/tomee-conf/server.xml | 55 +++++++++ 6 files changed, 148 insertions(+), 128 deletions(-) diff --git a/KNOWN_ISSUES.md b/KNOWN_ISSUES.md index c26fd8a..6fe2b80 100644 --- a/KNOWN_ISSUES.md +++ b/KNOWN_ISSUES.md @@ -25,7 +25,7 @@ Detail lives next to each runner: | di | 50/50 pass | — | — | | concurrency | 197 tests, 0 F + 0 E (14 TCK skips), signature passes | — | — | | data | 99 tests, 7 F + 29 E | 36 methods (EntityTests only) | openejb-jakarta-data query generation | -| servlet | 1,706 tests, 69 E | 69 tests | TomEE/Tomcat behavioral diffs | +| servlet | 1,706 tests, 12 E | 2 classes (12 methods) | TomEE aborts context startup on a missing referenced servlet/filter class | | pages | 682/682 pass | — | — (needs the runner's spec-default encoding overlay) | | rest | 2,803 tests, 4 F + 11 E | 14 tests | TomEE/CXF gaps (1 error was a fixed harness classpath gap) | | validation | 1,049 tests, 0 F (incl. signature test) | — | — (server pins the JAXB RI; see product gaps) | @@ -55,9 +55,13 @@ Fixes belong in Apache TomEE (or Tomcat); each removes exclusion entries. literal/`NOT`/`OR`/parenthesis handling in `@Query` JDQL, empty/partial query generation, cursored pagination, and static-metamodel sorts. All entries in [data.txt](runner-standalone/exclusions/data.txt). -2. **Servlet 6.1 behavioral differences** — async dispatch connection - handling (`DispatchTests` and async-context classes) and a set of - response-content mismatches. 69 entries in +2. **Servlet 6.1 deployment strictness** — TomEE aborts the whole context + startup when a war references a servlet or filter class it does not + package: the pluggability `RegistrationTests` deployment declares filter + `AddFilterString` and the spec `DefaultMappingTests` deployment declares + servlet `TestServlet1` without bundling either class, so both contexts + fail to start and every method in each class errors on the missing + deployment URL. 2 class entries (12 methods) in [servlet.txt](runner-standalone/exclusions/servlet.txt). 4. **RESTful Web Services 4.0** — TomEE refuses to deploy an application bundling a `@ConstrainedTo(RuntimeType.CLIENT)` provider diff --git a/runner-standalone/README.md b/runner-standalone/README.md index 46efa07..86d2a11 100644 --- a/runner-standalone/README.md +++ b/runner-standalone/README.md @@ -54,7 +54,7 @@ derived from; with the default exclusions applied these suites run green. | Concurrency 3.1 | `jakarta.enterprise:jakarta.enterprise.concurrent-tck:3.1.1` | `concurrency` | **Passes 197 tests, 0 failures, 0 errors, 14 skipped (the TCK's own skips), signature test included, no exclusions** (2026-07-18). The runner sets `openejb.environment.default=true` (declares the `java:comp/Default*` resource-env-refs the TCK injects via `@Resource(lookup=…)`; without it they silently inject `null`), adds a `beans.xml` per WAR so OWB activates the TCK's `@Priority` `Asynchr [...] | Data 1.0 | `jakarta.data:jakarta.data-tck:1.0.0` | `data` | **Runs: 99 tests, 7 failures, 29 errors** (2026-07-18), all in `standalone.entity.EntityTests`; the other six classes pass completely, signature test included. The runner's archive processor completes the TCK deployments the way a Jakarta Data runtime is expected to (adds the missing sibling classes, a `persistence.xml` on `java:comp/DefaultDataSource`, and a `beans.xml` with `bean-discovery-mode="all"` so `@Repository` interf [...] | RESTful Web Services 4.0 | EFTL zip (installed as `jakarta.ws.rs:jakarta-restful-ws-tck:4.0.1`) | `rest` | **Runs: 2,803 tests, 4 failures, 11 errors, 128 skipped** (2026-07-18, the skips are the TCK's own `@Disabled` tests) against TomEE's CXF, with the CXF client driving the client half of every test; the signature test passes. One error was a harness classpath gap (the CXF client needs `cxf-rt-rs-extension-providers` for spec-required JSON-B support) and is fixed in the runner; the [...] -| Servlet 6.1 | EFTL zip (installed as `jakarta.tck:servlet-tck-runtime:6.1.0`) | `servlet` | **Runs: 1,706 tests, 69 errors, 7 skipped** (2026-07-18). The harness is complete: slf4j-simple resolves at the TCK-derived version, the TCK's bundled client certificate is trusted and mapped (both client-cert tests pass, including the https-targeted deployment via a metadata observer reporting the TLS port); remaining errors are behavioral differences (async dispatch connection handling, respon [...] +| Servlet 6.1 | EFTL zip (installed as `jakarta.tck:servlet-tck-runtime:6.1.0`) | `servlet` | **Runs: 1,706 tests, 12 errors, 7 skipped** (2026-07-18). The harness is complete: slf4j-simple resolves at the TCK-derived version, the TCK's bundled client certificate is trusted and mapped (both client-cert tests pass, including the https-targeted deployment via a metadata observer reporting the TLS port), cross-context dispatch is enabled and the STRICT_SERVLET_COMPLIANCE subset (`alwaysAcce [...] | Pages 4.0 | EFTL zip (installed as `jakarta.tck:jakarta-pages-tck:4.0.0`) | `pages` | **Passes 682/682 (0 failures, 0 errors, signature test included, no exclusions)** (2026-07-18). Needs the Central `jakarta.tck:common`/`signaturetest` support line at 11.1.1 with sigtest 2.6 (the TCK pom's own pins depend on the unpublished JavaTest harness), and the overlay removes TomEE's global UTF-8 default encodings from conf/web.xml because the TCK asserts the spec default ISO-8859-1. Its TomEE/ [...] | Validation 3.1 | EFTL zip (installed as `jakarta.validation:validation-tck-tests:3.1.1`) | `validation` | **Runs: 1,049 tests, 0 failures, no exclusions; the mandatory API signature test runs and passes** against the `jakarta.validation` packages the Plume distribution ships. Needs AssertJ 3.7.0 pinned (the published TCK jar is compiled against its covariant signatures) and the JAXB RI pinned as `jakarta.xml.bind.JAXBContextFactory` in the server JVM (Plume ships both MOXy and the RI; [...] | WebSocket 2.2 | EFTL zip (installed as `jakarta.tck:websocket-tck-spec-tests:2.2.0`) | `websocket` | **Runs: 715 tests, 0 failures, 30 errors** (2026-07-18) against Tomcat's WebSocket implementation, driven through the `tomcat-websocket` client container; the signature test passes. 25 errors are the server-side negative-deployment classes: Tomcat halts the whole webapp deployment on an invalid endpoint (the spec-required halt, but Arquillian reports the failed deploy as an error before [...] diff --git a/runner-standalone/exclusions/servlet.txt b/runner-standalone/exclusions/servlet.txt index 9891fa9..f19e3ac 100644 --- a/runner-standalone/exclusions/servlet.txt +++ b/runner-standalone/exclusions/servlet.txt @@ -1,129 +1,22 @@ # Jakarta Servlet 6.1 TCK (jakarta.tck:servlet-tck-runtime:6.1.0) on the TomEE -# Plume snapshot, Java 21, 2026-07-18: 1,706 tests, 69 errors, 7 skipped. -# The harness itself is complete (https, client-cert, signature all pass). -# The errors cluster in async dispatch connection handling (DispatchTests and -# the async-context classes drop or reset connections mid-dispatch) and in -# response-content mismatches in the request/response wrapper and http tests. -# These are Tomcat/TomEE behavioral differences to triage as product results. -# Reviewed exclusions keep the remaining suite runnable; they are not -# compatibility passes. +# Plume snapshot, Java 21, 2026-07-18: 1,706 tests, 12 errors, 7 skipped. +# The harness is complete (https, client-cert, signature, cross-context +# dispatch, spec-default encoding, request trailers, and the STRICT_SERVLET_ +# COMPLIANCE subset are all configured). The remaining errors are two +# deployment behavioral differences: TomEE aborts context startup when a +# programmatically or declaratively referenced servlet/filter class is not +# packaged in the war, where the TCK expects the container to tolerate it. # # Format: maven-surefire excludesFile patterns, applied through # -Dtck.exclusions.file (see runner-standalone/README.md). -# DispatchTests: 14 of 38 executed methods fail -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#dispatchAfterCommitTest4 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#dispatchAfterCommitTest5 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#dispatchReturnTest4 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#dispatchReturnTest5 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#negativeDispatchTest12 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#negativeDispatchTest13 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#negativeDispatchTest8 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#negativeDispatchTest9 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest12 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest13 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest14 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest15 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest16 -**/servlet/tck/api/jakarta_servlet/dispatchtest/DispatchTests.java#startAsyncAgainTest17 - -# ServletContextTests: 1 of 28 executed methods fail -**/servlet/tck/api/jakarta_servlet/servletcontext/ServletContextTests.java#GetResource_2Test - -# ServletRequestTests: 2 of 39 executed methods fail -**/servlet/tck/api/jakarta_servlet/servletrequest/ServletRequestTests.java#getCharacterEncodingNullTest -**/servlet/tck/api/jakarta_servlet/servletrequest/ServletRequestTests.java#setCharacterEncodingTest1 - -# ServletRequestWrapperTests: 1 of 32 executed methods fail -**/servlet/tck/api/jakarta_servlet/servletrequestwrapper/ServletRequestWrapperTests.java#setCharacterEncodingTest1 - -# ServletResponseTests: 3 of 32 executed methods fail -**/servlet/tck/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getCharacterEncodingDefaultTest -**/servlet/tck/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getContentTypeTest -**/servlet/tck/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getWriterTest - -# ServletResponseWrapperTests: 3 of 20 executed methods fail -**/servlet/tck/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#getContentTypeTest -**/servlet/tck/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#getWriterTest -**/servlet/tck/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#setCharacterEncodingTest - -# HttpServletRequestTests: 3 of 70 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#getCharacterEncodingTest -**/servlet/tck/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#sessionTimeoutTest -**/servlet/tck/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#setCharacterEncodingTest1 - -# HttpServletRequest40Tests: 1 of 11 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpservletrequest40/HttpServletRequest40Tests.java#TrailerTest - -# HttpServletRequestWrapperTests: 1 of 60 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpservletrequestwrapper/HttpServletRequestWrapperTests.java#setCharacterEncodingTest1 - -# HttpServletResponseTests: 5 of 44 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#getCharacterEncodingDefaultTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#getWriterTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#sendRedirectWithLeadingSlashTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#sendRedirectWithoutLeadingSlashTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#setCharacterEncodingTest - -# HttpServletResponseWrapperTests: 4 of 34 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#getContentTypeTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#getWriterTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#sendRedirectTest -**/servlet/tck/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#setCharacterEncodingTest - -# HttpSessionxTests: 4 of 8 executed methods fail -**/servlet/tck/api/jakarta_servlet_http/httpsessionx/HttpSessionxTests.java#expireHttpSessionxrfTest -**/servlet/tck/api/jakarta_servlet_http/httpsessionx/HttpSessionxTests.java#expireHttpSessionxri1Test -**/servlet/tck/api/jakarta_servlet_http/httpsessionx/HttpSessionxTests.java#expireHttpSessionxriTest -**/servlet/tck/api/jakarta_servlet_http/httpsessionx/HttpSessionxTests.java#invalidateHttpSessionxTest - -# RegistrationTests: 1 failing +# RegistrationTests (pluggability): the deployment declares filter +# AddFilterString without bundling +# servlet.tck.api.jakarta_servlet.servletcontext30.AddFilterString, so TomEE +# fails the whole context startup and every method errors on the missing URL. **/servlet/tck/pluggability/api/jakarta_servlet/registration/RegistrationTests.java -# ServletContextTests: 1 of 24 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet/servletcontext/ServletContextTests.java#GetResource_2Test - -# ServletRequestTests: 2 of 39 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet/servletrequest/ServletRequestTests.java#getCharacterEncodingNullTest -**/servlet/tck/pluggability/api/jakarta_servlet/servletrequest/ServletRequestTests.java#setCharacterEncodingTest1 - -# ServletRequestWrapperTests: 1 of 32 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet/servletrequestwrapper/ServletRequestWrapperTests.java#setCharacterEncodingTest1 - -# ServletResponseTests: 3 of 32 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getCharacterEncodingDefaultTest -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getContentTypeTest -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponse/ServletResponseTests.java#getWriterTest - -# ServletResponseWrapperTests: 3 of 20 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#getContentTypeTest -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#getWriterTest -**/servlet/tck/pluggability/api/jakarta_servlet/servletresponsewrapper/ServletResponseWrapperTests.java#setCharacterEncodingTest - -# HttpServletRequestTests: 3 of 70 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#getCharacterEncodingTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#sessionTimeoutTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletrequest/HttpServletRequestTests.java#setCharacterEncodingTest1 - -# HttpServletRequestWrapperTests: 1 of 58 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletrequestwrapper/HttpServletRequestWrapperTests.java#setCharacterEncodingTest1 - -# HttpServletResponseTests: 5 of 44 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#getCharacterEncodingDefaultTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#getWriterTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#sendRedirectWithLeadingSlashTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#sendRedirectWithoutLeadingSlashTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponse/HttpServletResponseTests.java#setCharacterEncodingTest - -# HttpServletResponseWrapperTests: 4 of 34 executed methods fail -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#getContentTypeTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#getWriterTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#sendRedirectTest -**/servlet/tck/pluggability/api/jakarta_servlet_http/httpservletresponsewrapper/HttpServletResponseWrapperTests.java#setCharacterEncodingTest - -# DefaultMappingTests: 1 failing +# DefaultMappingTests (spec): the deployment declares servlet +# servlet.tck.spec.requestmap.TestServlet1 without bundling it, so TomEE +# fails the whole context startup and both methods error on the missing URL. **/servlet/tck/spec/defaultmapping/DefaultMappingTests.java - -# EncodingTests: 2 of 3 executed methods fail -**/servlet/tck/spec/i18n/encoding/EncodingTests.java#spec2Test -**/servlet/tck/spec/i18n/encoding/EncodingTests.java#spec3Test diff --git a/runner-standalone/servlet/pom.xml b/runner-standalone/servlet/pom.xml index 5fdaa0e..4fabc9c 100644 --- a/runner-standalone/servlet/pom.xml +++ b/runner-standalone/servlet/pom.xml @@ -102,7 +102,7 @@ <classifier>${tomee.classifier}</classifier> <type>zip</type> <outputDirectory>${project.build.directory}/tomee</outputDirectory> - <includes>**/lib/servlet-api.jar</includes> + <includes>**/lib/servlet-api.jar,**/conf/web.xml</includes> </artifactItem> </artifactItems> </configuration> @@ -149,6 +149,26 @@ <pathconvert pathsep="${path.separator}" property="servlet.sig.api.jar" refid="servlet-api-jar"/> + <!-- TomEE's global conf/web.xml pins the request/response + character encodings to UTF-8; the Servlet TCK asserts the + specification defaults (null request encoding, ISO-8859-1 + response) when a war declares nothing, so the overlay ships + the distribution's own web.xml with those two overrides + removed. It also lacks the ja->Shift_Jis locale mapping the + setLocale-driven encoding tests expect (Tomcat no longer + carries a built-in default), so inject one into the same + global descriptor. --> + <copy todir="${project.build.directory}/tomee-overlay/conf" + overwrite="true" flatten="true"> + <fileset dir="${project.build.directory}/tomee" + includes="**/conf/web.xml"/> + </copy> + <replaceregexp file="${project.build.directory}/tomee-overlay/conf/web.xml" + match="^\s*<(request|response)-character-encoding>UTF-8</\1-character-encoding>\s*$" + replace="" byline="true"/> + <replaceregexp file="${project.build.directory}/tomee-overlay/conf/web.xml" + match="</web-app>" + replace=" <locale-encoding-mapping-list>${line.separator} <locale-encoding-mapping>${line.separator} <locale>ja</locale>${line.separator} <encoding>Shift_Jis</encoding>${line.separator} </locale-encoding-mapping>${line.separator} </locale-encoding-mapping-list>${line.separator}</web-app>"/> </target> </configuration> </execution> @@ -189,7 +209,10 @@ </dependenciesToScan> <excludesFile>${tck.exclusions.file}</excludesFile> <systemPropertyVariables> - <servlet.tck.support.crossContext>false</servlet.tck.support.crossContext> + <!-- Cross-context dispatch is enabled through the module's + conf/context.xml (crossContext="true"), so the client asserts + the full DispatchTests/HttpSessionxTests expectations instead + of skipping them. --> <servlet.tck.support.http2Push>false</servlet.tck.support.http2Push> <servlet.tck.slf4jimpl>org.slf4j:slf4j-simple</servlet.tck.slf4jimpl> <javax.net.ssl.keyStore>${project.build.directory}/certificates/clientcert.jks</javax.net.ssl.keyStore> diff --git a/runner-standalone/servlet/src/tomee-conf/context.xml b/runner-standalone/servlet/src/tomee-conf/context.xml new file mode 100644 index 0000000..3047bab --- /dev/null +++ b/runner-standalone/servlet/src/tomee-conf/context.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + 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. +--> +<!-- The contents of this file will be loaded for each web application. + + This module-local copy overrides the distribution's conf/context.xml to + supply the per-context settings the Servlet TCK expects: + + * crossContext="true" so DispatchTests and HttpSessionxTests can + dispatch and share sessions across contexts (the TCK's server-side + servlets default servlet.tck.support.crossContext to "true"). + * the subset of STRICT_SERVLET_COMPLIANCE the TCK relies on: + alwaysAccessSession, contextGetResourceRequiresSlash, + useRelativeRedirects, and the Manager sessionActivityCheck / + sessionLastAccessAtStart flags, which drive ServletContext + GetResource_2Test, HttpServletResponse sendRedirect*, and + sessionTimeoutTest. --> +<Context crossContext="true" + alwaysAccessSession="true" + contextGetResourceRequiresSlash="true" + useRelativeRedirects="false"> + + <!-- Default set of monitored resources. If one of these changes, the --> + <!-- web application will be reloaded. --> + <WatchedResource>WEB-INF/web.xml</WatchedResource> + <WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource> + <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource> + + <Manager sessionActivityCheck="true" + sessionLastAccessAtStart="true"/> +</Context> diff --git a/runner-standalone/servlet/src/tomee-conf/server.xml b/runner-standalone/servlet/src/tomee-conf/server.xml new file mode 100644 index 0000000..093c79b --- /dev/null +++ b/runner-standalone/servlet/src/tomee-conf/server.xml @@ -0,0 +1,55 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- Fixed single-worker ports; see environment/README.md. The Arquillian + remote adapter rewrites these ports from the tomee.*.port properties, so + the literal values here only serve side-by-side runs. This module-local + copy overrides the shared environment/tomee/conf/server.xml to add + allowedTrailerHeaders, which HttpServletRequest40Tests#TrailerTest needs + to read request trailer fields. --> +<Server port="8005" shutdown="SHUTDOWN"> + <Listener className="org.apache.tomee.catalina.ServerListener"/> + <Listener className="org.apache.catalina.startup.VersionLoggerListener"/> + <Listener className="org.apache.catalina.core.JreMemoryLeakPreventionListener"/> + <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/> + <Listener className="org.apache.catalina.core.ThreadLocalLeakPreventionListener"/> + + <GlobalNamingResources> + <Resource name="UserDatabase" auth="Container" + type="org.apache.catalina.UserDatabase" + factory="org.apache.catalina.users.MemoryUserDatabaseFactory" + pathname="conf/tomcat-users.xml"/> + </GlobalNamingResources> + + <Service name="Catalina"> + <Connector port="8080" protocol="HTTP/1.1" + connectionTimeout="20000" allowTrace="true" + allowedTrailerHeaders="myTrailer,myTrailer2" + redirectPort="8443"/> + + <Connector port="8443" protocol="org.apache.coyote.http11.Http11NioProtocol" + SSLEnabled="true" scheme="https" secure="true"> + <SSLHostConfig protocols="TLSv1.2" + certificateVerification="optional" + truststoreFile="conf/server-truststore.p12" + truststorePassword="changeit" + truststoreType="PKCS12"> + <Certificate certificateKeystoreFile="conf/server.p12" + certificateKeystorePassword="changeit" + certificateKeystoreType="PKCS12" + certificateKeyAlias="server" + type="RSA"/> + </SSLHostConfig> + </Connector> + + <Engine name="Catalina" defaultHost="localhost"> + <Realm className="org.apache.catalina.realm.LockOutRealm"> + <Realm className="org.apache.catalina.realm.UserDatabaseRealm" + resourceName="UserDatabase"/> + </Realm> + <Host name="localhost" appBase="webapps" unpackWARs="true" autoDeploy="true"> + <Valve className="org.apache.catalina.valves.AccessLogValve" + directory="logs" prefix="localhost_access_log." suffix=".txt" + pattern="%h %l %u %t "%r" %s %b"/> + </Host> + </Engine> + </Service> +</Server>
