You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Michael Molloy <ta...@gmail.com> on 2011/09/19 08:07:59 UTC
Re: Problem pushing application to production
One other thought. Looking over the http://tapestry.apache.org/https.html page again, I notice that it is saying there is a need for that method if your application has some pages that are secure and others that are not. In my case, all of mine are secure, so I would think I could just use relative URLs, but Tapestry seems to be generating absolute URLs based on the internal server IP rather than the external domain name.
Is that a setting that I can change so that it only generates relative URLs?
--Michael
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem pushing application to production
Posted by Michael Molloy <ta...@gmail.com>.
Just reread this email from Denis, and I do understand the need for the full URL. Thank you, Denis.
I still don't understand why my implementation of BaseURLSource isn't working, however.
--Michael
On Sep 19, 2011, at 4:26 AM, Denis Delangle wrote:
> Hello,
>
> As https is managed by your load balancer, you don't think you need to
> add @secure annotations on Tapestry pages. Communication between load
> balancer and tomcat is done in HTTP
> Even if you stay all the time in https, Tapestry needs to send
> redirects to clients on form submissions (GET after POST). To do that,
> it needs the full url to redirect to.
>
> You can either contribute expected serveur name in tapestry with BaseUrlSource
> or in Tomcat using proxy information
> http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
>
> Hope that helps,
>
> Denis
>
>
> 2011/9/19 pieter <pi...@atos.net>:
>> that page you are referring to says: "If you want to make your entire
>> application secure: .... " and then a method to add to you appModule.
>>
>> If you do that (at least it was here the case) everything should work with
>> https & relative urls ...
>>
>> --
>> View this message in context: http://tapestry.1045711.n5.nabble.com/Problem-pushing-application-to-production-tp4817901p4818037.html
>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem pushing application to production
Posted by Denis Delangle <de...@gmail.com>.
Hello,
As the SSL part is totally managed by the load balancer, you could
simply disable security check in Tapestry using the symbol
tapestry.secure-enabled = false (default value is the same as
tapestry.production-mode, this is maybe why you don't have any problem
on other servers where tapestry.production-mode is false).
http://tapestry.apache.org/configuration.html#Configuration-tapestry.secureenabled
If this doesn't correct it, you could try something like this as all
your site is under https (if I understood correctly)
public static void
contributeServiceOverride(MappedConfiguration<Class,Object>
configuration)
{
BaseURLSource source = new BaseURLSource()
{
public String getBaseURL(boolean secure)
{
return https://secure.mysite.com;
}
};
Denis
2011/9/19 Michael Molloy <ta...@gmail.com>:
> Thanks, I was too sleepy (and desperate) to remember that last night. There is no SSL going on between the apache server and the tomcat server.
>
> Concerning the proxy link you listed below, there are already several production non-Tapestry apps running in this configuration, and none of them have this problem. In addition, I'm having the exact same problem on both a staging server and in my production servers. That's why I thought it was something peculiar to Tapestry that I'm just not familiar with yet. Worst case, I can set up a new Tomcat specifically for this application and try to configure it differently than the other ones, but I would prefer not to, of course.
>
> Do you see what I might be doing wrong with the BaseUrlSource method I added to AppModule? I was really hoping that this would take care of it.
>
> public static void contributeServiceOverride(MappedConfiguration<Class,Object> configuration)
> {
> BaseURLSource source = new BaseURLSource()
> {
> public String getBaseURL(boolean secure)
> {
> String protocol = secure ? "https" : "http";
>
> int port = secure ? 443 : 8080;
>
> return String.format("%s://secure.mysite.com:%d", protocol, port);
> }
> };
>
> configuration.add(BaseURLSource.class, source);
> }
>
> Thank you for your help.
>
> --Michael
>
> On Sep 19, 2011, at 4:26 AM, Denis Delangle wrote:
>
>> Hello,
>>
>> As https is managed by your load balancer, you don't think you need to
>> add @secure annotations on Tapestry pages. Communication between load
>> balancer and tomcat is done in HTTP
>> Even if you stay all the time in https, Tapestry needs to send
>> redirects to clients on form submissions (GET after POST). To do that,
>> it needs the full url to redirect to.
>>
>> You can either contribute expected serveur name in tapestry with BaseUrlSource
>> or in Tomcat using proxy information
>> http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
>>
>> Hope that helps,
>>
>> Denis
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem pushing application to production
Posted by Michael Molloy <ta...@gmail.com>.
Thanks, I was too sleepy (and desperate) to remember that last night. There is no SSL going on between the apache server and the tomcat server.
Concerning the proxy link you listed below, there are already several production non-Tapestry apps running in this configuration, and none of them have this problem. In addition, I'm having the exact same problem on both a staging server and in my production servers. That's why I thought it was something peculiar to Tapestry that I'm just not familiar with yet. Worst case, I can set up a new Tomcat specifically for this application and try to configure it differently than the other ones, but I would prefer not to, of course.
Do you see what I might be doing wrong with the BaseUrlSource method I added to AppModule? I was really hoping that this would take care of it.
public static void contributeServiceOverride(MappedConfiguration<Class,Object> configuration)
{
BaseURLSource source = new BaseURLSource()
{
public String getBaseURL(boolean secure)
{
String protocol = secure ? "https" : "http";
int port = secure ? 443 : 8080;
return String.format("%s://secure.mysite.com:%d", protocol, port);
}
};
configuration.add(BaseURLSource.class, source);
}
Thank you for your help.
--Michael
On Sep 19, 2011, at 4:26 AM, Denis Delangle wrote:
> Hello,
>
> As https is managed by your load balancer, you don't think you need to
> add @secure annotations on Tapestry pages. Communication between load
> balancer and tomcat is done in HTTP
> Even if you stay all the time in https, Tapestry needs to send
> redirects to clients on form submissions (GET after POST). To do that,
> it needs the full url to redirect to.
>
> You can either contribute expected serveur name in tapestry with BaseUrlSource
> or in Tomcat using proxy information
> http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
>
> Hope that helps,
>
> Denis
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
Re: Problem pushing application to production
Posted by Denis Delangle <de...@gmail.com>.
Hello,
As https is managed by your load balancer, you don't think you need to
add @secure annotations on Tapestry pages. Communication between load
balancer and tomcat is done in HTTP
Even if you stay all the time in https, Tapestry needs to send
redirects to clients on form submissions (GET after POST). To do that,
it needs the full url to redirect to.
You can either contribute expected serveur name in tapestry with BaseUrlSource
or in Tomcat using proxy information
http://tomcat.apache.org/tomcat-7.0-doc/proxy-howto.html
Hope that helps,
Denis
2011/9/19 pieter <pi...@atos.net>:
> that page you are referring to says: "If you want to make your entire
> application secure: .... " and then a method to add to you appModule.
>
> If you do that (at least it was here the case) everything should work with
> https & relative urls ...
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Problem-pushing-application-to-production-tp4817901p4818037.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem pushing application to production
Posted by pieter <pi...@atos.net>.
that page you are referring to says: "If you want to make your entire
application secure: .... " and then a method to add to you appModule.
If you do that (at least it was here the case) everything should work with
https & relative urls ...
--
View this message in context: http://tapestry.1045711.n5.nabble.com/Problem-pushing-application-to-production-tp4817901p4818037.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org
Re: Problem pushing application to production
Posted by tapestry account <ta...@gmail.com>.
The URL for the login form does not contain the full URL to the server, so
why does Tapestry respond with the IP address?
--Michael
On Mon, Sep 19, 2011 at 1:07 AM, Michael Molloy <ta...@gmail.com>wrote:
> One other thought. Looking over the http://tapestry.apache.org/https.htmlpage again, I notice that it is saying there is a need for that method if
> your application has some pages that are secure and others that are not. In
> my case, all of mine are secure, so I would think I could just use relative
> URLs, but Tapestry seems to be generating absolute URLs based on the
> internal server IP rather than the external domain name.
>
> Is that a setting that I can change so that it only generates relative
> URLs?
>
> --Michael