0

I am working on a reverse proxy solution with Java servlets and Apache Tomcat as a webserver, my question how to intercept the HTTP request or server generated response and scan the entire text(HTML and script content) in it.Any suggestions,solutions or literature will appreciated. And suggestions are also required how to configure Tomcat running a reverse proxy or should i switch to some other Java web server.

Thanks in advance and sorry if question is incomplete any details required will be provided.

Mitul Karnik
  • 135
  • 1
  • 4
  • 11
  • Have a look at this question: stackoverflow.com/questions/7138296/how-do-i-get-the-source-of-a-given-url-from-a-servlet – Rafi Kamal Sep 17 '13 at 06:45

1 Answers1

1

Looks like you want to add a layer before serving response, You can add Filter and check for outbound response

jmj
  • 237,923
  • 42
  • 401
  • 438
  • Sure but to intercept the request what method should i use ? And then how to scan the entire content? – Mitul Karnik Sep 17 '13 at 11:05
  • [here](http://stackoverflow.com/questions/8933054/how-to-log-response-content-from-a-java-web-server) is an example – jmj Sep 17 '13 at 15:34