how to get https port number in Wicket 1.5
Assuming that the http/https port number have been set in WicketApplication with the following: setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443))); ... is there any way to get access to the port numbers from components? One obvious solution is something like: public class WicketApplication { public int getHttpPort() { return 8080; } public int getHttpsPort() { return 8443; } public void init () { // ... setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(getHttpPort(), getHttpsPort(; } } And then in my components: ((WicketApplication) getApplication()).getHttpsPort(); But I am wondering if there is a cleaner way to get this information, perhaps from the RequestCycle. Why am I asking? I'd like to create a Form subclass that always uses https. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-tp4295139p4295139.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
Re: how to get https port number in Wicket 1.5
Stupid question. Is @RequireHttps at Form class working? Cheers Per Am 14.01.2012 17:44, schrieb armhold: Assuming that the http/https port number have been set in WicketApplication with the following: setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443))); ... is there any way to get access to the port numbers from components? One obvious solution is something like: public class WicketApplication { public int getHttpPort() { return 8080; } public int getHttpsPort() { return 8443; } public void init () { // ... setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(getHttpPort(), getHttpsPort(; } } And then in my components: ((WicketApplication) getApplication()).getHttpsPort(); But I am wondering if there is a cleaner way to get this information, perhaps from the RequestCycle. Why am I asking? I'd like to create a Form subclass that always uses https. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-tp4295139p4295139.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 - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org
Re: how to get https port number in Wicket 1.5
Stupid = my question not yours :-). Only for clearify it :-) Am 14.01.2012 19:05, schrieb Per Newgro: Stupid question. Is @RequireHttps at Form class working? Cheers Per Am 14.01.2012 17:44, schrieb armhold: Assuming that the http/https port number have been set in WicketApplication with the following: setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(8080, 8443))); ... is there any way to get access to the port numbers from components? One obvious solution is something like: public class WicketApplication { public int getHttpPort() { return 8080; } public int getHttpsPort() { return 8443; } public void init () { // ... setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new HttpsConfig(getHttpPort(), getHttpsPort(; } } And then in my components: ((WicketApplication) getApplication()).getHttpsPort(); But I am wondering if there is a cleaner way to get this information, perhaps from the RequestCycle. Why am I asking? I'd like to create a Form subclass that always uses https. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-tp4295139p4295139.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 - 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
Re: how to get https port number in Wicket 1.5
Hi Per, The documentation for @RequireHttps implies that it only works for pages, not components, and my (limited) testing shows that to be the case. Is there a way to use it with components on otherwise insecure pages? My use case is to secure a form on non-https pages, specifically to secure that very nice username/password field at the top of Twitter Bootstrap pages. Thanks -- View this message in context: http://apache-wicket.1842946.n4.nabble.com/how-to-get-https-port-number-in-Wicket-1-5-tp4295139p4296003.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
Wicket spring security sample app
Does someone have a sample of the current spring security with Wicket auth-roles? One that I can do the following. mvn jetty:run and see it run? brian -- Brian Lavender http://www.brie.com/brian/ "There are two ways of constructing a software design. One way is to make it so simple that there are obviously no deficiencies. And the other way is to make it so complicated that there are no obvious deficiencies." Professor C. A. R. Hoare The 1980 Turing award lecture - To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org For additional commands, e-mail: users-h...@wicket.apache.org