ServletFilter not able to intercept an http request.

Apoorva Sharma April 21, 2023

Hi Experts,

We have been trying to intercept an http request that triggers a specific batch.js file which is causing us delay. For this we are using servlet filters. 

But here is the interesting part: The filter is being written for the url-pattern

/*jira.general,-_super/batch.js*

but it is not capturing all the requests associated with this pattern.

The one request we want to capture has some CDN ids and other unique ids appended just after the base url. Instead of capturing that request itself, what is happening is that somehow a new request with similar path is getting generated and the servlet filter operations are being performed on that request. The new almost duplicate request that is being generated is missing all those CDN ids and unique numbers from the url, rest of it is same.

We would really appreciate if someone can explain what is happening, how we are getting this almost duplicate request and how we can ensure that the original url is captured.

 

PS: We have tried to give complete url path in url-pattern but that did not work. At that time even no new url was getting created. 

Regards,

Apoorva

0 answers

Suggest an answer

Log in or Sign up to answer