Quick solution is to turn off the gzip compression (if this is possible). I don’t have any experience with Resin, but I’ve encountered such situation more than once and it happens when output is gzip compressed too soon in the stack (actually the servlet produces gzip output).
Other methods you can do:
modify browser (headers) so they won’t accept gzip compression (can be done for Mozilla / Chrome using a browser extension or configuration)
place a reverse proxy (nginx work well) between the user and the application and install oneagent on the host (this will inject JS)
if there is an application firewall between user and the server, you can modify the request headers not to accept compression (compression will happen between user and application firewall only)
You are right. On Java our OneAgent only injects into non compressed responses. The OneAgent tries to find a possibility to hook into the response processing chain before a compression takes place, which seems not to work for your environment.
These are our 4 main possibilities to overcome this challenge:
Turn on an experimental feature to do a recompression. As this will add some overhead it can only be set by our support engineers.
Try to identify the right place for injection in the response processing chain. We can define a java class name like a specific response filter which is involved before the compression in the chain and then the injection will be done within this class.
Place a web server like Apache or Nginx in front of your Java server
Manual injection - but as you wrote before this is not acceptable for you
Please create a support ticket in order to investigate if 1) or 2) can work. Please keep in mind that this works like we have designed it, as most of our customers are using a web server in front of their Java tier and we want to reduce the overhead on the “application tier” to the minimum.
But we can try to find a workaround.