Re: WicketSessionFilter and several domains

2009-11-29 Thread Fernando Wermus
This is what I think about how to solve this problem, except that it will
take a round trip more for the user who accesses to .com.ar

thanks!

On Sat, Nov 28, 2009 at 11:22 AM, bgooren b...@iswd.nl wrote:


 Well, even if it's regional the question remains why your site is available
 over two domainnames. You can solve your problem by running the site on one
 of the domains and issuing a 301 redirect from the other domainname to the
 main domain. Or did I misunderstand, and are you running the site from the
 .com.ar and only the flash part from the .com?

 Bas


 Fernando Wermus-2 wrote:
 
  Bas,
   The site is regional. It is for LATAM. I will try to append the
  session
  id to the flash post.
 
  thanks
 
  On Fri, Nov 27, 2009 at 1:17 PM, bgooren b...@iswd.nl wrote:
 
 
  There are serveral options; The easiest is probably to append the
  sessionId
  to the URL you are accessing from the flash file; If that is not an
  option,
  host both the flash and the website on the same domain. Cross-domain
  issues
  are a hassle ;-)
 
  What's your reason for working with two domain names anyway?
 
  Bas
 
 
  Fernando Wermus-2 wrote:
  
   Bas,
   Thanks. I havent checked this behavior with other browsers. I
 will.
   What
   do you think is the best solution or approach to this problem?
  
   Fernando
 
  --
  View this message in context:
 
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26543760.html
  Sent from the Wicket - User 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
 
 
 
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 
 

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26547249.html
 Sent from the Wicket - User 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketSessionFilter and several domains

2009-11-28 Thread bgooren

Well, even if it's regional the question remains why your site is available
over two domainnames. You can solve your problem by running the site on one
of the domains and issuing a 301 redirect from the other domainname to the
main domain. Or did I misunderstand, and are you running the site from the
.com.ar and only the flash part from the .com?

Bas


Fernando Wermus-2 wrote:
 
 Bas,
  The site is regional. It is for LATAM. I will try to append the
 session
 id to the flash post.
 
 thanks
 
 On Fri, Nov 27, 2009 at 1:17 PM, bgooren b...@iswd.nl wrote:
 

 There are serveral options; The easiest is probably to append the
 sessionId
 to the URL you are accessing from the flash file; If that is not an
 option,
 host both the flash and the website on the same domain. Cross-domain
 issues
 are a hassle ;-)

 What's your reason for working with two domain names anyway?

 Bas


 Fernando Wermus-2 wrote:
 
  Bas,
  Thanks. I havent checked this behavior with other browsers. I will.
  What
  do you think is the best solution or approach to this problem?
 
  Fernando

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26543760.html
 Sent from the Wicket - User 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


 
 
 -- 
 Fernando Wermus.
 
 www.linkedin.com/in/fernandowermus
 
 

-- 
View this message in context: 
http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26547249.html
Sent from the Wicket - User 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: WicketSessionFilter and several domains

2009-11-27 Thread Fernando Wermus
Bas,
Thanks. I havent checked this behavior with other browsers. I will. What
do you think is the best solution or approach to this problem?

Fernando

On Fri, Nov 27, 2009 at 7:36 AM, bgooren b...@iswd.nl wrote:


 Given your detailed explanation, I think the problem is clear: your browser
 (and thus the flash client as well) is protected so it can only use cookies
 _for the same domain_. So if you load a flash movie from .com.ar and have
 it
 connect to a .com, it will not use the cookie(s) it got from the .com.ar;

 So what you are seeing is expected behavior.

 Bas

 Fernando Wermus-2 wrote:
 
  Bas,
 
I will try to explain what it is going on with this scenario
 (anyway
  I
  think you understood).
 
  1. an user logs in the site using .com.ar
  2. the user gets a flex component in the site's page. The flex component
  is
  compiled to point to .com services.
  3. the flex component asks a specific service to the back-end which
  consults
  if this user has a wicket session, it fails.
 
  The user has never change the tab which is using.
 
  He has a cookie because he is accessing to the site using the same tab.
  Thus, it shouldnt have been any problem.
 
  On the another hand, I have set up the server with two dns manager, one
  for
  each domain.
 
  ---
  | a page (from .com.ar)  |
  |  |
  | --   |
  ||  a flex component | |
  ||  (connects .com)  | |
  ---
 
  MessageBrokerServlet, flex component back end, which needs
  wicketSessionFilter to verify user authentication.
  WicketSessionServletFilter which injects the session into
  MessageBrokerServlet.
  WicketFilter.
 
  flex client   --- MessageBrokerServlet through .com
  the page WicketFilter through .com.ar
 
  I know the cookie should be the same because they are in the same tab,
 but
  it is also truth that they connect using differents domains.
 
  The message log4j sends to me it is clear. It couldnt reach the session.
 
  Thanks anyway.

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26539906.html
 Sent from the Wicket - User 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketSessionFilter and several domains

2009-11-27 Thread bgooren

There are serveral options; The easiest is probably to append the sessionId
to the URL you are accessing from the flash file; If that is not an option,
host both the flash and the website on the same domain. Cross-domain issues
are a hassle ;-)

What's your reason for working with two domain names anyway?

Bas


Fernando Wermus-2 wrote:
 
 Bas,
 Thanks. I havent checked this behavior with other browsers. I will.
 What
 do you think is the best solution or approach to this problem?
 
 Fernando

-- 
View this message in context: 
http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26543760.html
Sent from the Wicket - User 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: WicketSessionFilter and several domains

2009-11-27 Thread Fernando Wermus
Bas,
 The site is regional. It is for LATAM. I will try to append the session
id to the flash post.

thanks

On Fri, Nov 27, 2009 at 1:17 PM, bgooren b...@iswd.nl wrote:


 There are serveral options; The easiest is probably to append the sessionId
 to the URL you are accessing from the flash file; If that is not an option,
 host both the flash and the website on the same domain. Cross-domain issues
 are a hassle ;-)

 What's your reason for working with two domain names anyway?

 Bas


 Fernando Wermus-2 wrote:
 
  Bas,
  Thanks. I havent checked this behavior with other browsers. I will.
  What
  do you think is the best solution or approach to this problem?
 
  Fernando

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26543760.html
 Sent from the Wicket - User 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketSessionFilter and several domains

2009-11-26 Thread bgooren

Did you check if a session is actually created, e.g. do you see a cookie?

I cannot imagine that if you use the exact same flow, and the only
difference is the domain name, it would work in the one case but not the
other.
What happens exactly? Getting the session returns null?

I suggest you try a debugger for finding out what's happening inside the
WicketSessionFilter.


Fernando Wermus-2 wrote:
 
 Bas,
  What I actually did was to login in .com and test the servlet I
 mentioned you. Then I logged out and logged in the site using .com.ar
 again.
 This second time failed. In this case, it seems that I am  using different
 cookies and it shouldn't to affect if I get the session.
 
 To be more specific,
 
 I have some embeded flex clients which connects to Blazeds. I need to get
 wicket session to know who has logged in using wicket front end. Each flex
 client has been compiled using a specific url from the site. The servlet
 that is in charge is messageBroker that delegates to a class of my own the
 service called.There it is where I couldnt get the session when the user
 logged in to a specific domain.
 
 Thanks in advance.
 

-- 
View this message in context: 
http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26526474.html
Sent from the Wicket - User 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: WicketSessionFilter and several domains

2009-11-26 Thread Fernando Wermus
Bas,

  I will try to explain what it is going on with this scenario (anyway I
think you understood).

1. an user logs in the site using .com.ar
2. the user gets a flex component in the site's page. The flex component is
compiled to point to .com services.
3. the flex component asks a specific service to the back-end which consults
if this user has a wicket session, it fails.

The user has never change the tab which is using.

He has a cookie because he is accessing to the site using the same tab.
Thus, it shouldnt have been any problem.

On the another hand, I have set up the server with two dns manager, one for
each domain.

---
| a page (from .com.ar)  |
|  |
| --   |
||  a flex component | |
||  (connects .com)  | |
---

MessageBrokerServlet, flex component back end, which needs
wicketSessionFilter to verify user authentication.
WicketSessionServletFilter which injects the session into
MessageBrokerServlet.
WicketFilter.

flex client   --- MessageBrokerServlet through .com
the page WicketFilter through .com.ar

I know the cookie should be the same because they are in the same tab, but
it is also truth that they connect using differents domains.

The message log4j sends to me it is clear. It couldnt reach the session.

Thanks anyway.

On Thu, Nov 26, 2009 at 9:30 AM, bgooren b...@iswd.nl wrote:


 Did you check if a session is actually created, e.g. do you see a cookie?

 I cannot imagine that if you use the exact same flow, and the only
 difference is the domain name, it would work in the one case but not the
 other.
 What happens exactly? Getting the session returns null?

 I suggest you try a debugger for finding out what's happening inside the
 WicketSessionFilter.


 Fernando Wermus-2 wrote:
 
  Bas,
   What I actually did was to login in .com and test the servlet I
  mentioned you. Then I logged out and logged in the site using .com.ar
  again.
  This second time failed. In this case, it seems that I am  using
 different
  cookies and it shouldn't to affect if I get the session.
 
  To be more specific,
 
  I have some embeded flex clients which connects to Blazeds. I need to get
  wicket session to know who has logged in using wicket front end. Each
 flex
  client has been compiled using a specific url from the site. The servlet
  that is in charge is messageBroker that delegates to a class of my own
 the
  service called.There it is where I couldnt get the session when the user
  logged in to a specific domain.
 
  Thanks in advance.
 

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26526474.html
 Sent from the Wicket - User 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus


Re: WicketSessionFilter and several domains

2009-11-25 Thread bgooren

If you are using session cookies, the answer is simple: your browser only
sends the cookie for the domain from which it was set. Simply put: if a
cookie gets set from the .com, it is not available on the .com.ar

Bas


Fernando Wermus-2 wrote:
 
 Hi all,
 I have several domain for a site: .com and a .com.ar. I got to get the
 session in a servlet using WicketSessionFilter for .com domain, but I
 failed
 in the another case. How come?
 
 thanks in advance.
 
 -- 
 Fernando Wermus.
 
 www.linkedin.com/in/fernandowermus
 
 

-- 
View this message in context: 
http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26511240.html
Sent from the Wicket - User 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: WicketSessionFilter and several domains

2009-11-25 Thread Fernando Wermus
Bas,
 What I actually did was to login in .com and test the servlet I
mentioned you. Then I logged out and logged in the site using .com.ar again.
This second time failed. In this case, it seems that I am  using different
cookies and it shouldn't to affect if I get the session.

To be more specific,

I have some embeded flex clients which connects to Blazeds. I need to get
wicket session to know who has logged in using wicket front end. Each flex
client has been compiled using a specific url from the site. The servlet
that is in charge is messageBroker that delegates to a class of my own the
service called.There it is where I couldnt get the session when the user
logged in to a specific domain.

Thanks in advance.


On Wed, Nov 25, 2009 at 9:36 AM, bgooren b...@iswd.nl wrote:


 If you are using session cookies, the answer is simple: your browser only
 sends the cookie for the domain from which it was set. Simply put: if a
 cookie gets set from the .com, it is not available on the .com.ar

 Bas


 Fernando Wermus-2 wrote:
 
  Hi all,
  I have several domain for a site: .com and a .com.ar. I got to get
 the
  session in a servlet using WicketSessionFilter for .com domain, but I
  failed
  in the another case. How come?
 
  thanks in advance.
 
  --
  Fernando Wermus.
 
  www.linkedin.com/in/fernandowermus
 
 

 --
 View this message in context:
 http://old.nabble.com/WicketSessionFilter-and-several-domains-tp26502429p26511240.html
 Sent from the Wicket - User 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




-- 
Fernando Wermus.

www.linkedin.com/in/fernandowermus