Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • #mount(IRequestTargetUrlCodingStrategy)
  • #mount(String, PackageName)
  • #mountBookmarkablePage(String, Class<T>)
  • #mountBookmarkablePage(String, String, Class<T>)
    an to mount a resource:
  • #mountSharedResource(String, String)
    For more information about these methods check https://cwiki.apache.org/WICKET/url-coding-strategies.html

A new way in Wicket 6

The org.apache.wicket.protocol.https.HttpsMapper can now be subclassed. This means that by overriding the org.apache.wicket.protocol.https.HttpsMapper.getDesiredScheme method you can programmatically determine what scheme to use.
Add this to your Application.java:

Code Block

public void init() {
    super.init();
    setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(80, 443)) {
        @Override
        protected Scheme getDesiredSchemeFor(Class<? extends IrequestablePAge> pageClass) {
            if (getConfigurationType()==RunTimeConfigurationType.DEVELOPMENT) {
                return Scheme.HTTP;
            else
                return super.getDesiredSchemeFor(pageClass);
        }
    }

The new way in Wicket 1.5

...