2 Answers
2

When Browser(client) request to the Server , the container like (Tomcat) create the Request Object for the client request HttpServletRequest and Response Object HttpServletResponse and
if you configure any listener which implements "ServletRequestListener" then "public void requestInitialized(ServletRequestEvent sre)" method will call

After creation of Request and Response Object by container if there is any listener for Request then Listener will execute first.....

After that HttpServletRequest and HttpServletResponse are assign to the Fillter , if you have configure the Fillter....

Means Listener come in picture first for ServletRequest .
So there is no way to configure to make Fillter execute before Listener in ServletRequest case ....

so, it is not possible to have the filter.doFilter() executed before a listener.requestInitialized()? i am reading the servlet 2.5 spec, but i don't find this info. download.oracle.com/otn-pub/jcp/… where is this explained?
–
David PortabellaApr 17 '12 at 12:57