Redirecting URL: "HTTP" to "HTTPS"

If you want to redirect non-SSL URL (HTTP) to SSL URL (HTTPS), do the following:

  1. Go to psa_x.y.z/conf/web.xml file
  2. Insert the following code  before the closing tag of </web-app> and save the file.

    Redirection Code
    <security-constraint>
        <web-resource-collection>
          <web-resource-name>Protected Context</web-resource-name>
          <url-pattern>/*</url-pattern>
        </web-resource-collection>
        <!-- auth-constraint goes here if you requre authentication -->
        <user-data-constraint>
          <transport-guarantee>CONFIDENTIAL</transport-guarantee>
        </user-data-constraint>
      </security-constraint>
  3. Go to psa_x.y.z/conf/server.xml file.
  4. Make sure that the redirectPort in the "<Connector port="8888">" block is set to the SSL port.
  5. Save the file.
  6. Restart the application
     

Any changes you make to the web.xml and server.xml must be manually made in the respective files after every upgrade. DO NOT copy the files after each upgrade.