one does not need to copy cookies because browsers retain them across requests.

-igor


On Sat, Apr 30, 2011 at 5:01 PM, Alec Swan <alecs...@gmail.com> wrote:
> Hello,
>
> I tried copying all cookies from the HTTP request to HTTP response and
> it seemed to have a positive effect (unless our hosting company fixed
> something on their load balancer). However, I would expect Wicket to
> copy cookies from request to response by default, is this true?
>
> Here is the code I added trying to fix the problem with the load
> balancer cookie being lost:
>
> // copy all cookies from parent page to modal window in order to
> support sticky sessions on load balancer
>                    Cookie[] cookies = ((WebRequest)
> getRequestCycle().getRequest()).getCookies();
>                    for (Cookie cookie : cookies) {
>                        ((WebResponse)
> getRequestCycle().getResponse()).addCookie(cookie);
>                    }
>
> Thanks,
>
> Alec
>
> On Fri, Apr 29, 2011 at 4:17 PM, Alec Swan <alecs...@gmail.com> wrote:
>> Hello,
>>
>> We just put our webapp behind a load balancer with sticky sessions.
>> After that we started noticing that load balancer cookie gets lost
>> when a modal window is popped up by a link click. Here is the code we
>> use to display the modal window:
>>
>> new AjaxLink("editLink")
>>                    {
>>                        @Override
>>                        public void onClick(AjaxRequestTarget target) {
>>                            modalWindow.setPageCreator(new
>> ModalWindow.PageCreator() {
>>                            @Override
>>                             public Page createPage() {
>>                                  ....
>>                             }
>>                        }
>>                    });
>>
>> How can we make sure that cookies get preserved when we pop up a modal 
>> window?
>>
>> Thanks,
>>
>> Alec
>>
>
> ---------------------------------------------------------------------
> 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

Reply via email to