3 Replies Latest reply on Nov 27, 2006 7:58 AM by afedoren

    redirect port 8080 to 8443

    khandan

      Hi everybody
      which can i redirect port from 8080 to 8443 and from 8443 to 8080.
      i wish when i type http://localhot:8080/myapp, browser swich to https://locahost:8443/myapp.
      i changed jboss-4.0.4.GA/server/default/deploy/jbossweb-tomcat55.sar/server.xml but
      that was not corrected.
      thanks for your help

        • 1. Re: redirect port 8080 to 8443
          afedoren

          If you want to switch to https:// , configure your resources
          with user-data-constraint/transport-guaranteer as CONFIDENTIAL.

          Refer to web.xml format configuration.

          • 2. Re: redirect port 8443 to 8080
            khandan

            i insert this part to my web.xml :
            <security-constraint>
            <web-resource-collection>
            <web-resource-name>view dept data</web-resource-name>
            <url-pattern>/login/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
            </web-resource-collection>
            <!--<auth-constraint>-->
            <!--<role-name>user</role-name>-->
            <!--</auth-constraint>-->
            <user-data-constraint>
            <transport-guarantee>CONFIDENTIAL</transport-guarantee>
            </user-data-constraint>
            </security-constraint>
            now when i type http://localhost:8080/myapp browser go to https://localhost:8443/myapp
            but after login browser dont com back to http://localhost:8080/myapp
            thanks

            • 3. Re: redirect port 8080 to 8443
              afedoren

              Seems you want just to login securely ?

              You can try to setup
              <transport-guarantee>NONE</transport-guarantee>
              on other pages, I don't know if it will help.

              If you use Apache in front, it could be easily solved with UrlRewrite
              module.