Re: JAX-RS endpoints stopped working with trailing slash in 10M3

Markus Jung <[email protected]> Sat, 9 Nov 2024 18:46:23 +0100
Newsgroups gmane.comp.java.openejb.user
Message-ID <44BC47BC-7273-44F2-8F2C-C1B285AE341F__45269.5444155083$1731174402$gmane$org@apache.org>
Hey Alex,

Quick follow-up from my side. I now finally have some time to dig deeper into why this happens. I filed a bug for this here (https://issues.apache.org/jira/browse/TOMEE-4424) now and will try to get it fixed before we release 10.0.0-M4. An easy workaround would be to remove any <welcome-file> tags you defined in web.xml if you don’t really need them.


Thanks

Markus

> On 25. Oct 2024, at 09:50, Markus Jung <[email protected]> wrote:
> 
> Hi Alex,
> 
> 
> this sounds like a regression at first glance, I'll look into this and try to get it fixed. Thanks for testing milestone builds and giving us a heads up we might've broken something!
> 
> 
> Thanks
> 
> Markus
> 
> 
> On 24.10.24 19:04, Shiryaev, Alexander wrote:
>> Hello,
>> 
>> JAX-RS endpoints no longer work in Tomee 10M3 if we call them with trailing slash. It worked fine in 10M2.
>> GET /api/hello - works
>> GET /api/hello/ - doesn't works. Getting 404.
>> 
>> It's likely related to https://issues.apache.org/jira/browse/TOMEE-4406 changes.
>> We can use the same war file as in TOMEE-4406 to replicate the issue.
>> 
>> Is it expected behavior or a regression? In my understanding both URLs (with and without trailing slash) should be resolved to the same JAX-RS endpoint.
>> 
>> Thanks
>> Alex
>>