setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new
Now if I am at Page1 (http://localhost:8080/page1) and there I have
add(new BookmarkablePageLink<Void>("page2", Page2.class));
then the generated url is https://localhost:8443/page2 because the
HttpsMapper wraps the old root mapper that knows about Page2.
implement org.apache.wicket.request.mapper.ICompoundRequestMapper so when
mountPage(page3) is called Wicket creates a
new org.apache.wicket.request.mapper.CompoundRequestMapper that adds the
current root mapper (HttpsMapper) at position 1 and a MountedMapper for
Page3 at position 2. So requests to Page3 are not handled by HttpsMapper
and the generated urls are HTTP, not HTTPS.
HttpsMapper intentionally doesn't implement ICompoundRequestMapper exactly
for this reason - to make it possible to configure pages which should never
Wicket Training and Consulting
On Fri, Oct 14, 2016 at 2:48 PM, Lars Törner <lars.tor...@gmail.com> wrote:
> we had a problem where a bookmarkable link didn't become a https link.
> I found this:
> Which, with a warning, states:
> "It is extemtely important that when setting the rootRequestMapper it is
> done AFTER you have added any bookmarkable links otherwise they will not be
> switched over to Secure mode."
> I found that we in our Application.init() did the opposite, i.e. set the
> rootRequestMapper before the page mounting. Problem solved, I thought.
> Instead the problem was that the page wasn't mounted at all, and the only
> thing that worked was to mount the page and keep the order we had, which,
> according to the link and the warning above is bound to fail.
> Please, can anyone tell me what I'm missing here?
> Wicket version: 6.22.