Tapestry
  1. Tapestry
  2. TAPESTRY-2566

Errors in code examples of "Securing your application with HTTPS"

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.15
    • Component/s: Documentation
    • Labels:
      None
    • Environment:
      n/a

      Description

      On the page describing "Securing your application with HTTPS" with the URL http://tapestry.apache.org/tapestry5/guide/secure.html , there are small mistakes in the code examples.

      In the section "Securing Multiple Pages", the examples refer to the method "put" and a wrong constants class

      the line : configuration.put("admin:" + TapestryConstants.SECURE_PAGE, "true");

      should be: configuration.add("admin:" + MetaDataConstants.SECURE_PAGE, "true");

      The other example shoud be changed accordingly.

      In the section "Base URL Support", the ports in the example are mixed up.

      The line: int port = secure ? 8080 : 8443;
      should be: int port = secure ? 8443 : 8080;

      as 8443 is more usual for https, and 8080 for http, for Tomcat and I believe Jetty.

      The line

      public void contributeAlias(Configuration<AliasContribution> configuration)

      could maybe be improved to
      public static void contributeAlias(final Configuration<AliasContribution<BaseURLSource>> configuration)

      since AliasContribution is a generic class.

        Activity

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Lutz Hühnken
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development