You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by jchappelle <jc...@4redi.com> on 2012/08/06 22:10:59 UTC
MountedMapper and CryptoMapper
Currently I am using CryptoMapper for my application. It is installed in the
init method of my application like this: setRootRequestMapper(new
CryptoMapper(getRootRequestMapper(), this));. I need some of my pages to be
bookmarkable with a url like /abc. I was able to accomplish this by doing
this in my init method: getRootRequestMapperAsCompound().add(new
MountedMapper("/abc", AbcPage.class));
My problem is that if I do it like that then the url's generated for any
clicks on that page are not encrypted. Ideally I would like the urls to be
encrypted. Is there any way around this? I'm sure it is possible to write an
IRequestMapper or extend MountedMapper but I'm not really sure how to go
about it.
Any ideas?
Thanks,
Josh
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MountedMapper-and-CryptoMapper-tp4651024.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: MountedMapper and CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
I think what I am going to do is have a mounted page called AbcMountedPage
that throws a RestartResponseAtInterceptPageException so that it redirects
to AbcPage. That way AbcPage will be handled by CryptoMapper. I've also
noticed that there is a RedirectPage. I could extend that I suppose.
It's not perfect but it's not that bad either.
Thanks for your help.
Josh
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MountedMapper-and-CryptoMapper-tp4651024p4651040.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: MountedMapper and CryptoMapper
Posted by jchappelle <jc...@4redi.com>.
Hi Jesse,
Thanks for the response.
I am using 1.5.4. And I don't have any other IRequestMappers installed.
I will say that it doesn't affect other pages. So if I click a link that
takes me to another page then it's fine. However, we use bread crumb pages
quite a bit so if one page has encryption turned off then that might mean
several "views" for the end-user.
Maybe there is a way to redirect to an encrypted mapper after the
mountedmapper does it's thing? So if the user types http://server/abc then
the mountedmapper would determine which page that is and maybe get
cryptomapper to rewrite the url as encrypted and process it from there? Not
sure I'm just throwing out ideas.
Josh
--
View this message in context: http://apache-wicket.1842946.n4.nabble.com/MountedMapper-and-CryptoMapper-tp4651024p4651037.html
Sent from the Users forum mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org
Re: MountedMapper and CryptoMapper
Posted by Jesse Long <jp...@unknown.za.net>.
Hi Josh,
On 06/08/2012 22:10, jchappelle wrote:
> Currently I am using CryptoMapper for my application. It is installed in the
> init method of my application like this: setRootRequestMapper(new
> CryptoMapper(getRootRequestMapper(), this));. I need some of my pages to be
> bookmarkable with a url like /abc. I was able to accomplish this by doing
> this in my init method: getRootRequestMapperAsCompound().add(new
> MountedMapper("/abc", AbcPage.class));
It may be easier to just do this:
mountPage("/abc", AbcPage.class);
It does the same thing with less typing.
> My problem is that if I do it like that then the url's generated for any
> clicks on that page are not encrypted. Ideally I would like the urls to be
> encrypted. Is there any way around this? I'm sure it is possible to write an
> IRequestMapper or extend MountedMapper but I'm not really sure how to go
> about it.
>
> Any ideas?
That is strange behaviour. Mounting pages should not affect the URLs
generated for pages not handled by the MountedMapper for those mounted
pages. I have tested, and 1.5.7 and 6.0.0-beta3 do not have this
behaviour. Which version are you using?
It is very likely that links to mounted pages will be unencrypted, but
link to other pages served from within a mounted page should be
encrypted (unless those other pages are also mounted of course).
Do you perhaps have any other custom IRequestMappers installed, possibly
overriding mapHandler()?
Cheers,
Jesse
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org