Tomcat 7 SSL and getDesiredSchemeFor problem

2015-09-17 Thread Sandor Feher
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:










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



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



11 years and still strong

2015-09-17 Thread Andrea Del Bene
https://dzone.com/articles/poll-what-java-jvm-frameworks-do-you-use
:-)


Adding css from my webapp directory

2015-09-17 Thread Ephraim Rosenfeld
Hello Team Wicket:

I have the following situation:

I have a web application with its own .css files that I add to the markup of my 
Base page:


 

//etc.


I one particular page I am using the Wicket framework to dynamically add .css:
public class MyTheme extend Behavior {
private static final ResourceReference CSS = new 
CssResourceReference(MyTheme.class, "themes/mytheme.css");

@Override
public void renderHead(Component component, IHeaderResponse 
response) {

response.render(CssHeaderItem.forReference(CSS));
}

}

The problem is that this dynamic css is overriding my static .css. When I load 
the page the dynamic .css is referenced lower down in  tag than my static 
.css  tag.

To get around this issue I would like to use the same  CssHeaderItem 
functionality to add the .css file from my 'webapp' directory to override the 
dynamic .css that I am adding via Java.

How can I reference a .css file within my 'webapp' directory to add it 
dynamically via Java to my page?

Thank you in advance,

- Ephraim



Re: Adding css from my webapp directory

2015-09-17 Thread Francois Meillet
PriorityHeaderItem renders at the beginning of the header
response.render(new PriorityHeaderItem(CssHeaderItem.forReference(CSS)));

François 





Le 17 sept. 2015 à 21:47, Ephraim Rosenfeld  a écrit :

> Hello Team Wicket:
> 
> I have the following situation:
> 
> I have a web application with its own .css files that I add to the markup of 
> my Base page:
> 
>
> 
>
> //etc.
> 
> 
> I one particular page I am using the Wicket framework to dynamically add .css:
> public class MyTheme extend Behavior {
>private static final ResourceReference CSS = new 
> CssResourceReference(MyTheme.class, "themes/mytheme.css");
> 
>@Override
>public void renderHead(Component component, IHeaderResponse 
> response) {
>
> response.render(CssHeaderItem.forReference(CSS));
>}
> 
> }
> 
> The problem is that this dynamic css is overriding my static .css. When I 
> load the page the dynamic .css is referenced lower down in  tag than my 
> static .css  tag.
> 
> To get around this issue I would like to use the same  CssHeaderItem 
> functionality to add the .css file from my 'webapp' directory to override the 
> dynamic .css that I am adding via Java.
> 
> How can I reference a .css file within my 'webapp' directory to add it 
> dynamically via Java to my page?
> 
> Thank you in advance,
> 
> - Ephraim
>