You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Néstor Boscán <ne...@tcs.com.ve> on 2013/09/30 22:49:35 UTC
S2: Using HTTPS, when I redirect, I get HTTP
Hi
I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
weblogic is behind a loadbalancer that does https to http translation. When
the application uses a redirect it will use HTTP instead of the original
HTTPS protocol. Is there a way to force redirect to use HTTPS?
Regards,
Néstor Boscán
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Lukasz Lenart <lu...@apache.org>.
2013/10/2 Néstor Boscán <ne...@tcs.com.ve>:
> So if I use:
>
> <result name="cambiarPassword" type="redirect">https://${
> host}/cambioPassword!input.action</result>
>
> It will work?
>
> Don't I have to set the servlet context and namespace?
It won't work OOTB - you must add additional getters to your action -
it was just an idea how you can solve that. I give you few ways which
depend on scale of your problem. If it is just one redirect, above
sample is simpler that writing new Result from scratch.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Néstor Boscán <ne...@tcs.com.ve>.
So if I use:
<result name="cambiarPassword" type="redirect">https://${
host}/cambioPassword!input.action</result>
It will work?
Don't I have to set the servlet context and namespace?
Regards,
Néstor Boscán
On Wed, Oct 2, 2013 at 1:08 AM, Lukasz Lenart <lu...@apache.org>wrote:
> 2013/10/1 Paul Benedict <pb...@apache.org>:
> > Hmm. Well, there's a couple issues to consider here.
> >
> > 1) When you're behind a load balancer, the machine name (domain) you're
> > running on may not be the domain that's fronted to the public. For
> example,
> > the user might be accessing www.company.org but you're on
> > host123.company.org. When you're changing protocols, you have to include
> > the FQN. Does your app know the public domain?
> >
> > 2) Is there a Struts enhancement hiding in this question? Maybe we should
> > include a "protocol" and "hostname" as redirect parameters? Lukasz,
> > thoughts?
>
> No but we can...
>
> Anyway, there is another option:
>
> <result name="cambiarPassword"
> type="redirect">${schema}://${host}/cambioPassword!input.action</result>
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Lukasz Lenart <lu...@apache.org>.
2013/10/1 Paul Benedict <pb...@apache.org>:
> Hmm. Well, there's a couple issues to consider here.
>
> 1) When you're behind a load balancer, the machine name (domain) you're
> running on may not be the domain that's fronted to the public. For example,
> the user might be accessing www.company.org but you're on
> host123.company.org. When you're changing protocols, you have to include
> the FQN. Does your app know the public domain?
>
> 2) Is there a Struts enhancement hiding in this question? Maybe we should
> include a "protocol" and "hostname" as redirect parameters? Lukasz,
> thoughts?
No but we can...
Anyway, there is another option:
<result name="cambiarPassword"
type="redirect">${schema}://${host}/cambioPassword!input.action</result>
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Paul Benedict <pb...@apache.org>.
Hmm. Well, there's a couple issues to consider here.
1) When you're behind a load balancer, the machine name (domain) you're
running on may not be the domain that's fronted to the public. For example,
the user might be accessing www.company.org but you're on
host123.company.org. When you're changing protocols, you have to include
the FQN. Does your app know the public domain?
2) Is there a Struts enhancement hiding in this question? Maybe we should
include a "protocol" and "hostname" as redirect parameters? Lukasz,
thoughts?
Paul
On Tue, Oct 1, 2013 at 9:48 AM, Néstor Boscán <ne...@tcs.com.ve>wrote:
> This one:
>
> <result name="cambiarPassword"
> type="redirect">cambioPassword!input.action</result>
>
> Regards
>
>
> On Tuesday, October 1, 2013, Lukasz Lenart <lu...@apache.org>
> wrote:
> > 2013/9/30 Néstor Boscán <ne...@tcs.com.ve>:
> >> I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
> >> weblogic is behind a loadbalancer that does https to http translation.
> When
> >> the application uses a redirect it will use HTTP instead of the original
> >> HTTPS protocol. Is there a way to force redirect to use HTTPS?
> >
> > What kind of redirect? to action?
> >
> >
> > Regards
> > --
> > Łukasz
> > + 48 606 323 122 http://www.lenart.org.pl/
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
--
Cheers,
Paul
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Lukasz Lenart <lu...@apache.org>.
2013/10/1 Néstor Boscán <ne...@tcs.com.ve>:
> This one:
>
> <result name="cambiarPassword"
> type="redirect">cambioPassword!input.action</result>
It's a normal redirect (not redirectAction) so you can use
https://host/cambioPassword!input.action
Other option is to develop your own ServletRedirectResult.
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Néstor Boscán <ne...@tcs.com.ve>.
This one:
<result name="cambiarPassword"
type="redirect">cambioPassword!input.action</result>
Regards
On Tuesday, October 1, 2013, Lukasz Lenart <lu...@apache.org> wrote:
> 2013/9/30 Néstor Boscán <ne...@tcs.com.ve>:
>> I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
>> weblogic is behind a loadbalancer that does https to http translation.
When
>> the application uses a redirect it will use HTTP instead of the original
>> HTTPS protocol. Is there a way to force redirect to use HTTPS?
>
> What kind of redirect? to action?
>
>
> Regards
> --
> Łukasz
> + 48 606 323 122 http://www.lenart.org.pl/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Lukasz Lenart <lu...@apache.org>.
2013/9/30 Néstor Boscán <ne...@tcs.com.ve>:
> I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
> weblogic is behind a loadbalancer that does https to http translation. When
> the application uses a redirect it will use HTTP instead of the original
> HTTPS protocol. Is there a way to force redirect to use HTTPS?
What kind of redirect? to action?
Regards
--
Łukasz
+ 48 606 323 122 http://www.lenart.org.pl/
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by Néstor Boscán <ne...@tcs.com.ve>.
Hi
The name remains the same, the loadbalancer name. And yes the weblogic
server is not the same as the external name of the loadbalancer.
On Mon, Sep 30, 2013 at 6:44 PM, <jl...@gmail.com> wrote:
> And what happens with the name of the server? I suppose the name of the
> weblogic server is not the same as te external name of the loadbalancer, no?
> Sent via BlackBerry from T-Mobile
>
> -----Original Message-----
> From: Néstor Boscán <ne...@tcs.com.ve>
> Date: Mon, 30 Sep 2013 16:19:35
> To: Struts Users Mailing List<us...@struts.apache.org>
> Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
> Subject: S2: Using HTTPS, when I redirect, I get HTTP
>
> Hi
>
> I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
> weblogic is behind a loadbalancer that does https to http translation. When
> the application uses a redirect it will use HTTP instead of the original
> HTTPS protocol. Is there a way to force redirect to use HTTPS?
>
> Regards,
>
> Néstor Boscán
>
>
Re: S2: Using HTTPS, when I redirect, I get HTTP
Posted by jl...@gmail.com.
And what happens with the name of the server? I suppose the name of the weblogic server is not the same as te external name of the loadbalancer, no?
Sent via BlackBerry from T-Mobile
-----Original Message-----
From: Néstor Boscán <ne...@tcs.com.ve>
Date: Mon, 30 Sep 2013 16:19:35
To: Struts Users Mailing List<us...@struts.apache.org>
Reply-To: "Struts Users Mailing List" <us...@struts.apache.org>
Subject: S2: Using HTTPS, when I redirect, I get HTTP
Hi
I have an application that runs on weblogic 10.3.6 and struts 2.3.8. The
weblogic is behind a loadbalancer that does https to http translation. When
the application uses a redirect it will use HTTP instead of the original
HTTPS protocol. Is there a way to force redirect to use HTTPS?
Regards,
Néstor Boscán