Hi All, I am new to wicket. I am migrating my wicket 1.4 project to >wicket 1.5 (wicket 6.23.0).
IRequestTargetUrlCodingStrategy interface and all its implementations are replaced with the IRequestMapper and its respective implementations. ref : https://cwiki.apache.org/confluence/display/WICKET/Request+mapping In wicket, the mount path is assumed to be the first element after the domain. e.g. http://www.mydomain.com/mountpath.html/parameters However, my site's URLs are not. They are something like http://www.mydomain.com/keywordOne/keywordN/mountpath.html/parameters In wicket 1.4, I am using the org.apache.wicket.request.target.coding.AbstractRequestTargetUrlCodingStrategy.matches(String, boolean) to match the mount path by 'contains' instead of 'startWiths'. Everything is working fine. In wicket 6.23.0, I find that there is a suggested MountedMapper to replace the old BookmarkablePageRequestTargetUrlCodingStrategy. I am going to do some tricks in org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.parseRequest(Request) and org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.getCompatibilityScore(Request) After applying the tricks in AbstractBookmarkableMapper, it works fine now. it is a right direction for me to customize the MountedMapper to suit my needs? I also find a similar case in http://apache-wicket.1842946.n4.nabble.com/Mounting-pages-td4652091.html I check the CryptoMapper and HttpsMapper. It seems that they are not what I need. By doing mount(new MountedMapper("/#{keyword}/#{keyword2}/#{keyword3}/" + mountPath, mountPathPageClass)); I dont not need to do the tricks. It seems to be working fine as well. But when the count of {keyword}s in URL exceeds three, it cannot find the page. There is another question about the Mapper in wicket 6.23.0. After the org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.mapRequest(Request), my /keyword1/keywordN/ is removed because of the URL recreation by org.apache.wicket.core.request.mapper.AbstractBookmarkableMapper.UrlInfo. The result URL becomes http://www.mydomain.com/mountpath.html/parameters again. But I would like to keep my URL as http://www.mydomain.com/keywordOne/keywordN/mountpath.html/parameters after matching. Is there any way for my to customize the mapper for this case? Many thanks for reading and helping! -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/Wicket-6-IRequestMapper-customization-for-mount-path-which-is-not-the-first-url-segment-tp4675063.html Sent from the Users forum mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org