users@jersey.java.net

[Jersey] How to require _at_Path to end with a slash?

From: cowwoc <cowwoc_at_bbs.darktech.org>
Date: Thu, 15 May 2014 21:10:06 -0400

Hi,

I have a root resource @Path("companies/") but Jersey 2.8 is responding
to http://example.com/companies.

Is there a way to configure Jersey to match
http://example.com/companies/ but not http://example.com/companies?

This is important because AJAX resolves relative paths differently
depending on whether or not the current URL ends with a slash (see
http://stackoverflow.com/a/4765962/14731)

Any ideas?
Gili