Re: Tomcat 7 SSL and getDesiredSchemeFor problem

2015-09-17 Thread Sven Meier

Hi,

> The sympthom is that super.getDesiredSchemeFor(pageClass) always 
returns HTTP

> regardless https or http is in the url.
>
> Scheme sm=super.getDesiredSchemeFor(pageClass);

did you annotate your pageClass with RequireHttps? Whether HTTPS is 
desired, does not depend on the scheme of the incoming url.


Regards
Sven

On 17.09.2015 11:50, Sandor Feher wrote:

Hi,

I don't know is it the appropriate channel I should ask but I hope somebody
can give me a pointer.
The sympthom is that super.getDesiredSchemeFor(pageClass) always returns
HTTP regardless https or http is in the url.
If I force Scheme.HTTPS then everything works fine.


TIA., Sandor

-
servlet.xml looks like this:


 
 


SSLCertificateFile="C:\apache-tomcat-7.0.64\conf\wildcard_hok-plastic_com.crt"
   
SSLCertificateKeyFile="C:\apache-tomcat-7.0.64\conf\wildcard_hok-plastic_com.key"

clientAuth="false" sslProtocol="TLS" />

 


My Application's relevant part is this:

setRootRequestMapper(new HttpsMapper(getRootRequestMapper(), new
HttpsConfig()) {

 @Override
 protected Scheme getDesiredSchemeFor(Class pageClass) {
 if (getConfigurationType() ==
RuntimeConfigurationType.DEVELOPMENT) {
 LOG.info("Dev mode, always use HTTP");
 return Scheme.HTTP;
 } else {
 
 Scheme sm=super.getDesiredSchemeFor(pageClass);

 sm=Scheme.HTTPS;
 LOG.info("not in development mode "+sm.name());
 return sm;
 }
 }

 });


  


--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tomcat-7-SSL-and-getDesiredSchemeFor-problem-tp4671980.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: Tomcat 7 SSL and getDesiredSchemeFor problem

2015-09-17 Thread Sandor Feher
Hi,

No I did not. I would like to get both method (http and https) accessible.
There is no proxy used.

s

--
View this message in context: 
http://apache-wicket.1842946.n4.nabble.com/Tomcat-7-SSL-and-getDesiredSchemeFor-problem-tp4671980p4671982.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