Why doesn't Response.sendRedirect() work after the binding of Tomcat with Apache server?

Oren Deri

Tomcat communicates with the Apache server using localhost. When tomcat gets the request it's from the Apache on localhost, so it also redirects the response to localhost.

Try the following:

  "http://" + request.getHeader("host") + "/" + yourFileName
0 Comments  (click to add your comment)
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.