We have a load-balancer sitting in front of two JBoss AS7 servers. The load-balancer handles the SSL handshake and forces all traffic over https (http requests are redirected to https requests), the AS nodes do not have certificates on them and traffic between load balancer and servers is unencrypted, the AS nodes know nothing about the SSL.
When a user hits a protected page the AS presents them with a login page. User enters credentials and submits the login form. The AS logs user in and then sends a redirect to the user to send them to the desired page. The redirect sent by the AS is an HTTP redirect. This gets grabbed by the load-balancer and redirected to HTTPS but I really want to avoid that second redirect. How can I tell the AS to return HTTPS redirect after login instead of HTTP?