I guess you didn't correctly implement the authentication process. How
does your page know that you have authenticated - is there a cookie
response or an additional header required? You might want to visualize
the correct order of the calls first and then implement it. You should
also check into asynchronous calls and then process the response and
only send a second call if necessary.

The main issue could be that you are re-using the XHR which has
different effects on Windows and Linux.

Cheers,
Benjamin

On Oct 26, 5:07 pm, Spitfire <[email protected]> wrote:
> Hi All,
>
> [code]
> ...
>
> function onSubmit() {
>
>     var req = new XMLHttpRequest();
>
>     req.open("GET", "http://localhost:4466/protected_resource/";,
> false);
>     req.send();
>
>     /* assuming for now, that the request to the resource will
> redirect me to the login page */
>
>     doAuth(req);
>
>     view.alert(req.responseText);
>
> }
>
> function doAuth(req) {
>     /* send POST request to j_security_check */
>     req.open("POST", "http://localhost:4466/j_security_check";, false);
>     req.send("&j_username=dummy" + "&j_password=dummy");
>
> }
>
> ...
> [/code]
>
> It works in linux, and I can see the page displaying the protected
> resource in the alert window. However, the same code in windows, still
> stays on the authentication page! And, I see the contents of the
> login.jsp page in the alert window.
>
> Any pointers to resolve the issue will be greatly appreciated.
>
> Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Desktop Developer Group" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-desktop-developer?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to