w3hello.com logo
Home PHP C# C++ Android Java Javascript Python IOS SQL HTML videos Categories
Servlet redirection not working with combination of Apache Tomcat + Apache server

Simple solution: Configure the base url (from the browser point of view) in a property and then use this as the base url to redirect. In this case you could use something like:

response.sendRedirect(baseURLproperty + request.getRequestURI()
+ "?" + request.getQueryString())

More complex solution: Since you are using apache as a reverse proxy you could configure it to add a custom request header with the original URL. Look at: http://httpd.apache.org/docs/2.2/mod/mod_proxy.html





© Copyright 2018 w3hello.com Publishing Limited. All rights reserved.