This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
I think that what you are doing should work if you are using tomcat (not sure about others). I heard talk of a bug in some of the older tomcat versions that didn't deal with this correctly. Have you tried upgrading to the latest version?
Joined: Sep 12, 2003
It turns out that this mapping is possible and that I just hadn't taken care of using the proper mapping ordering of the JAX-WS endpoints being used by my application. It seems that if your servlets are actually JAX-WS endpoints, as mine are, then you need to also have the endpoint mappings in the right order as well in sun-jaxws.xml. I didn't mention that I was using JAX-WS in my original post because I didn't think that it was relevant, but it turns out that the ordering of the JAX-WS endpoints has real implications here and is critical to getting this to work as desired.
As an example below are the relevant sections from the web.xml and sun-jaxws.xml files for my application, which is now working as described in my original post.
I hope this information will be helpful to someone else in the future.