-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA256 Steffen,
On 8/20/15 11:58 AM, Steffen Heil (Mailinglisten) wrote: > I have several servlets with mappings such as /a/* /b/* /c/* And so > on. > > One of these mappings was for the old Tomcat 7.0.27 websocket > implementation: /ws/* > > That worked. > > Now, with the new JSR version in Tomcat 8, I cannot get this to > work. The problem is, that all of the following paths shall match: > > /ws/a/b /ws/a/c /ws/d/e > > While these would work using /ws/{one}/{two}, the folloing won't: > > /ws/a/b/c /ws/x/Y/z/a So you have a servlet mapping for the uri-pattern of "/a/*", and the context path is "/ws"? I'm not sure why it would have worked in the past but not now. Can you be very clear about what used to work and is no longer working? > And I cannot know in advance, how many slashed there are. (This is > for a framework, not a specific application.) > > Is there any way to match those? Or to add a usual servlet mapping > instead of an URI Template? (Preferred programmatically, not per > web.xml, not per annotations.) I think you have two possibilities: 1. Manually set-up the uri-patterns so that they do not overlap 2. Write a Servlet (or Filter) that inspects the URL and makes its own decisions 3. Use something like url-rewrite as a config-only alternative for #2 I think due to your "not in web.xml" requirement, #1 cannot be done. > While I would prefer a clean solution, I am also fine with one > that works in tomcat only (using tomcat private functions). I'm still not sure I understand the use case. There should be a way to achieve what you want... I just don't yet understand the requirements. - -chris -----BEGIN PGP SIGNATURE----- Comment: GPGTools - http://gpgtools.org iQIcBAEBCAAGBQJV1kcMAAoJEBzwKT+lPKRYSaYP/0AhpDeSPCzk6dCPgYhrOzxU GUpM3vBz7w64Scy0gDqln74QJjCRadVvVNkw25i/HrIEv/85wFj6RlKskoizjoan m8XiS1MsVNmQQqAMcWV39Qu7vaq/X84uJ9T0EDxksLg1yo6BfRAmfdCciSr8mGQn JuI4smp9PV7S/MkJdn9p/ZbXVH9aOWqk/gcbV4/hvNLzqaL1hbR3KSE+DhAjDkDD WuVKKsO350jTfNue5xPRtPmAHrm9cIBCx+RPIUmICkbEAN9L3hT/nIOWxCA2ncaq EMuNO4d/YLXZ7X3/Bcp9fzzgdPjtwrNYJ3lJJ5vV6q1X5MldkjRhyVfiYcLsSLQO Fn8XBlnGEpMU94LHt6xGLDXwXE/3gAU7wePbX9X72GNVNLry1iMdd2Hqu3NzZ7gF hWj9IMJWGgcKV6K+YzKJJJSc9LzGw/jiRwBO3xPb22yHv47TDxecDkbS+Z1AuUKb 5k1gnsdPa/5Eh9TCrFBYGGXBjvLkCnZOQKtfAjoG2pFxvYIZZ1+6p0And/C5lNao QucJtiAxVt8vr7zHWuyDKi5BHqIwvD/DqMd/AfctiALJd766QKxol/8aDAOEdLN1 leGWvOgpn/Tl0flN16J6ZHsq3hcfgqzfWA66+uODhTVR6yxb0N/XpjNt3I1x6ZeV /9CdBewDPIC+aaH9RrO1 =1p52 -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org For additional commands, e-mail: users-h...@tomcat.apache.org