jakartaee / jakartaee/servlet

TCK: Servlet TCK tests still using web.xml with DTDs

Open
#1,004 11 comments 0 reactions 0 assignees View on GitHub
TCK:accepted TCK:challenge
Dominant language
Java
Stars
325
Forks
112
PR merge metrics
No merged PRs in 30d

Description

**Challenged tests**

1. servlet.tck.compat.LeadingSlash.WithLeadingSlash.WithLeadingSlashTests.WithLeadingSlashTest
2. servlet.tck.compat.LeadingSlash.WithoutLeadingSlash.WithoutLeadingSlashTests.WithoutLeadingSlashTest
3. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getRegistrationInitParameterTest
4. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.filterServletMappingTest
5. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getRegistrationInitParametersTest
6. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.servletRegistrationsTest
7. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.servletURLMappingTest
8. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getRegistrationNameTest
9. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getRegistrationClassNameTest
10. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getFilterRegistrationsTest
11. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getServletRegistrationTest
12. servlet.tck.pluggability.api.jakarta_servlet.registration.RegistrationTests.getFilterRegistrationTest
13. servlet.tck.spec.defaultmapping.DefaultMappingTests.defaultservletTest1
14. servlet.tck.spec.defaultmapping.DefaultMappingTests.defaultservletTest
15. servlet.tck.spec.servletresponse.servletResponseTests.testFlushBuffer
16. servlet.tck.spec.servletresponse.servletResponseTests.testFlushBufferHttp

**TCK Version**
Jakarta Servlet 6.1.0

**Description**
All 16 of the tests are failing with the error:

```
java.lang.RuntimeException: Could not lookup value for field public java.net.URL servlet.tck.common.client.BaseTckTest.url
at org.jboss.arquillian.test.impl.enricher.resource.ArquillianResourceTestEnricher.enrich(ArquillianResourceTestEnricher.java:67)
```

Our engineer diagnosed the problem with servlet.tck.compat.LeadingSlash.WithLeadingSlash.WithLeadingSlashTests.WithLeadingSlashTest as being caused by the use of a web.xml with a DTD reference. Given that there really is no backward compatibility in Jakarta EE prior to Jakarta EE 9 (due to the javax => jakarta package change) and the web.xml was changed from DTDs to schemas in J2EE 1.4's Servlet 2.4 specification, there is no reason to require support for pre-servlet 2.4 deployment descriptor in the Servlet 6.1 TCK.

**Additional context**
We are trying to pass the EE11 TCK but this is a blocking issue.

Contributor guide

Open the contributing guide

Research direction

Start with the 16 challenged Servlet TCK methods listed in the issue and locate their associated web.xml deployment descriptors, focusing first on the LeadingSlash test that was diagnosed. Remove the obsolete DTD references from the relevant descriptors and run the listed tests; done means the resource lookup error is resolved and all 16 tests pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
testing-qa
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.