I am having a strange problem with redirects in JBoss AS7 whereas I did NOT have these same problems in JBoss 4, 5 or 6.
Here is a diagram of the servers I am using:
Here is a description of what is going on:
<connector name="ajp" protocol="AJP/1.3" socket-binding="ajp" scheme="https" redirect-port="443"/>
I have created a very, very simple web application SimpleWebapp that has two JSP pages only:
1) index.jsp
<html>
<body>
<% System.out.println("Preparing to redirect"); %>
<% response.sendRedirect("test.jsp"); %>
</body>
</html>
2) test.jsp
<html>
<body>
It worked
</body>
</html>
When I go to:
https://192.168.2.2/SimpleWebapp
Suddenly the URL becomes
https://192.168.2.2:80/SimpleWebapp/test.jsp
Note: The port 80, when I clearly specified redirect-port to 443. When I change the connector to scheme="ajp", then restart jboss, the redirect is even more incorrect:
ajp://192.168.2.2:80/SimpleWebapp/test.jsp
The redirect-port parameter seems to be completely ignored. Does anyone know what is going on here?
I got it to work with this:
<connector name="ajp" protocol="AJP/1.3" scheme="https" socket-binding="ajp" proxy-name="192.168.2.2" proxy-port="443" />