Hi,
I'm using the transparent proxyseverlet with jetty 9 and try to intercept the response and modify it, but if I add a filter and try to read the response, it is empty.
To show you the problem I have setup a little example:
1. I have started a hello world server which retruns "Hello world" if I execute a get request on localhost:8080 (Java code:
http://pastebin.com/5rDAP4i7)
2. Now I have started a jetty server with a transparent proxyservlet on port 8012 which forwards all messages to 8080. I assumed that I can see the "hello world" string in the ServletResponse in the doFilter method, but it is allways "null". (Java code:
http://pastebin.com/w78wY4ji wrapper class:
http://pastebin.com/fNkAHu5b)
here is the output:
2014-05-17 09:51:30.939:WARN:oejsh.ContextHandler:main: o.e.j.s.ServletContextHandler@3802f063{/,null,null} contextPath ends with /*
2014-05-17 09:51:30.940:WARN:oejsh.ContextHandler:main: Empty contextPath
2014-05-17 09:51:30.949:INFO:oejs.Server:main: jetty-9.1.2.v20140210
2014-05-17 09:51:31.050:INFO:oejsh.ContextHandler:main: Started o.e.j.s.ServletContextHandler@3802f063{/,null,AVAILABLE}
2014-05-17 09:51:31.056:INFO:oejs.ServerConnector:main: Started ServerConnector@906fc22{HTTP/1.1}{0.0.0.0:8012}
>>> CONTEENT: null
kind regards