users@jersey.java.net

Jersey/Tomcat multi-level context paths?

From: Casper Bang <casper_at_jbr.dk>
Date: Wed, 21 Oct 2009 13:46:29 +0200

Hello Jersey list,

Have anyone successfully deployed with multi-leveled context paths with
Jersey? I am having trouble doing so.

While often relying on just a single directory context path, the name
"path" itself suggests it should be possible to use multiple levels. My
use case for doing this, is so that I can deploy a canonical
/mywebservice which automatically redirects to the latest version
/mywebservice/v3. This appears to be a common practice for REST and I
like the fact that I can leave my old service running for compatibility
and migration reasons.

The thing is, Tomcat (6.0.14) appears to complete ignore successive
elements of the context path. Funny enough, this is NOT the case when I
run on a local Tomcat (6.0.18) bundled with NetBeans. Also, I can't find
any obvious config difference in server.xml. My only theory is that
6.0.18 somehow fixed this issue from 6.0.14, but I am unable to dig up
any confirmation regarding this. Before I attempt to upgrade out
production Tomcat's, I was wondering whether the smart readers of this
list have encountered something similar?

Thanks in advance,
Casper