Details
-
Bug
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
5.0
-
None
-
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.