I just read that the setRootRequestMapper should be after all the mounts. I tried it and it still down't work.
setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), httpsConfig)); On Mar 3, 2012, at 12:12 AM, Douglas Ferguson wrote: > After tracing through the code, I see that when mounting pages, those mappers > will bypass the root mapper by wrapping it in a "composite" > > So then I tried this: > > mount(new HttpsMapper(new MountedMapper(PAGE_MOUNT_MAP.get(page), page, new > UrlPathPageParametersEncoder()), httpsConfig)); > > Now my pages are redirecting as I would expect, however, I get a null pointer: > > java.lang.NullPointerException > at > org.apache.wicket.protocol.https.HttpsMapper.mapHandler(HttpsMapper.java:129) > at > org.apache.wicket.request.mapper.CompoundRequestMapper.mapHandler(CompoundRequestMapper.java:157) > > On Mar 2, 2012, at 11:00 AM, Douglas Ferguson wrote: > >> Thanks. I just found that and was about to report back. ;) >> >> One thing I just noticed is that my @RequireHttps annotation doesn't appear >> to be working. >> Do I need to configure that app to work with that? >> >> Douglas >> >> On Mar 2, 2012, at 10:20 AM, Igor Vaynberg wrote: >> >>> write your own irequestcyclelistener, implement >>> onrequesthandlerresolved() and in that method check if the handler is >>> a IPageRequestHandler and stash the page anywhere you want, like in >>> the request cycle's metadata. >>> >>> -igor >>> >>> On Fri, Mar 2, 2012 at 8:08 AM, Douglas Ferguson <the...@gmail.com> wrote: >>>> This doesn't work. >>>> >>>> Seems like cycle.getActiveRequestHandler() always returns null when in the >>>> endRequest call back. >>>> >>>> Thoughts? >>>> >>>> Douglas >>>> >>>> On Mar 2, 2012, at 8:13 AM, Douglas Ferguson wrote: >>>> >>>>> I want to save off the previous page at then end of each request. >>>>> Can be handy for things like oauth (making sure we return to the correct >>>>> spot in the app). >>>>> >>>>> In 1.4 I could just pull the page class and parameters off the >>>>> RequestCycle. >>>>> Not I have to check to see if the active handler is IPageRequestHandler. >>>>> >>>>> Is this safe? What scenarios exist where the RequestHandler will not be >>>>> an IPageClassRequestHandler? >>>>> >>>>> This is the only thing I could come up with. >>>>> >>>>> public void onEndRequest(RequestCycle cycle) >>>>> { >>>>> if(cycle.getActiveRequestHandler() >>>>> instanceof IPageClassRequestHandler){ >>>>> previousPageClass = >>>>> ((IPageClassRequestHandler)cycle.getActiveRequestHandler()).getPageClass() >>>>> }else{ >>>>> log.error("cycle is not an >>>>> IpageClassRequesthandler "+cycle); >>>>> } >>>>> } >>>> >>>> >>>> --------------------------------------------------------------------- >>>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>>> For additional commands, e-mail: users-h...@wicket.apache.org >>>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org >>> For additional commands, e-mail: users-h...@wicket.apache.org >>> >> > --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org