简体   繁体   中英

Servlet filter working selectively

I have a Spring/JSF application that redirects to open reports (based on LogiInfo reporting tool) in a new window. A servlet filter has been applied to append/modify certain parameters before it is launched using the resp.sendRedirect(reportURL); On my test environments this works perfectly and all the reports launch as expected. However on the client environment, a subset of the reports just do not launch and end up showing the 403 Forbidden error on the new window. After some debugging I realized that the URL is also not modified as the doFilter() itself does not get invoked for these subset of reports (in fact the Tomcat does not even receive the 'GET' request for these URLs).

(UPDATE) The major difference between the two is :

  1. that the test server runs on Tomcat 7.0 whereas the client environment runs on 8.0.
  2. the web server is Apache 2.2 in the test environment & Apache 2.4 in the client environment

It is a strange issue and I'm not sure where to look as there is absolutely no difference in .xhtml pages that invoke these reports or their javascript. Any idea as to why this selective behaviour is in play?

It turned out to be a firewall related issue and nothing to do with either the Apache or Tomcat servers. It was blocking the URLs from some of the reports since they have single quotes in them.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM