I'm working on a CMS.
My code is inside the doGet()
function of a servlet invoked at url "/market"
. I want a HttpServletRequestWrapper
that would pass through all filters set for url "/page"
.
I expect these filters would update the request, so that an annotation processor could later inject dependencies with correct values.
I'm in a Tomcat server, so I should be able to cast to the right special object, and I don't have to be compliant to other servers.
An associated question is that using req.getRequestDispatcher(path).forward(requestWrapper, responseWrapper);
, I was expecting the filters to be invoked. Should they ?
The javadoc says:
This method allows one servlet to do preliminary processing of a request