views:

76

answers:

0

I'm working on setting up a Jersey test suite for a servlet and a servlet filter that I want to test behavior of the combination of the two for. What I'm confused is how the Jersey documentation states how to build WebAppDescriptor using the WebAppDescriptor.Builder class, specifically between the servletClass() and the filterClass() methods:

servletClass()

Set the servlet class.

Setting a servlet class resets the filter class to null.

filterClass()

Set the filter class.

Setting a filter class resets the servlet class to null


Now, my understanding of the web.xml is that I can set a servlet class and then throw filters in front of it to help parse out the request or add content to the request for the servlets. If this is true, then how can I use the Jersey test framework to set up a WebAppDescriptor that uses a filter first, then passes those results to the servlet class?