问题
I have 2 ear application (Primary and Proxy). The primary application is build using Servlet JSP MVC.
Now, I want to create a Proxy application (ear app) to listen and log all the requests and response going and coming from the Primary application.
I cannot modify the Primary application, have only control on the Proxy application that I am writing.
Can I write a simple Servlet Filter to listen all the requests on my primary application.
Note: Both the applications will run in WAS, may be same ports can be configured.
I WILL RECEIVE THE REQUESTS ONLY on my PRIMARY APPLICATION. Hence I feel using RequestDispatcher may not be the appropriate one. Kindly advice.
来源:https://stackoverflow.com/questions/56398286/intercept-another-web-application-requests