You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by MP3HiFi <in...@mp3hifi.de> on 2011/09/23 14:01:55 UTC

Missing cookie when calling URL outside browser

Hello,

I have a curious handling within my tapestry application. My application has
a login, which is saved in a cookie. When calling the protected page within
the browser using the complete url everything is working fine. The cookie is
found and the user is logged in.

When calling the same URL outside the browser, i.e. Excel with hyperlink,
the cookie is not found, the login is, as a result of the missing cookie,
not executed manually.

Is there a workaround for that problem.

Thanks in advance.
Martin

--
View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-cookie-when-calling-URL-outside-browser-tp4833233p4833233.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: Missing cookie when calling URL outside browser

Posted by MP3HiFi <in...@mp3hifi.de>.
Thanks Tahe,

that post/trick have solved my problem.

I created a dynamic JavaScript 

void setupRender() {
		StringBuffer sb = new StringBuffer();	
		sb.append("window.location =\""+getRedirect()+"\" ;");	
		javaScriptSupport.addScript(sb.toString());	
	}

and it works without any problems.


Regards
Martin





--
View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-cookie-when-calling-URL-outside-browser-tp4833233p4841338.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: Missing cookie when calling URL outside browser

Posted by Taha Hafeez <ta...@gmail.com>.
This trick might help

http://www.vc2go.com/2009/11/cookie-based-authentication-does-not-work-with-excel.html


On Fri, Sep 23, 2011 at 11:38 PM, MP3HiFi <in...@mp3hifi.de> wrote:
> Hello Taha,
>
> that a cookie is only available within the same the same domain is ok.
>
> I have an application server running my application. I am calling the
> application from within Firefox and the cookie is found by the application
> server. No probs here. When calling the same url via hyperlink in Excel,
> Firefox is started with the url, but the cookie ins't found. When entering
> the manually in Firefox URL now , the cookie is found.
>
> In my opinion the ony difference is that Firefox is started by Excel and not
> by myself, but there must be a difference. The same behaviour when using IE
> or Chrome.
>
> Regards
> Martin
>
>
>
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-cookie-when-calling-URL-outside-browser-tp4833233p4834601.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
>
>



-- 
Regards

Taha Hafeez Siddiqi (tawus)
http://tawus.wordpress.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: Missing cookie when calling URL outside browser

Posted by MP3HiFi <in...@mp3hifi.de>.
Hello Taha,

that a cookie is only available within the same the same domain is ok.

I have an application server running my application. I am calling the
application from within Firefox and the cookie is found by the application
server. No probs here. When calling the same url via hyperlink in Excel,
Firefox is started with the url, but the cookie ins't found. When entering
the manually in Firefox URL now , the cookie is found.

In my opinion the ony difference is that Firefox is started by Excel and not
by myself, but there must be a difference. The same behaviour when using IE
or Chrome.

Regards
Martin



--
View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-cookie-when-calling-URL-outside-browser-tp4833233p4834601.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: Missing cookie when calling URL outside browser

Posted by Taha Hafeez Siddiqi <ta...@gmail.com>.
Hi Martin

Cookies can only be accessed from the same domain. Also if two applications are trying to access a url e.g. a web browser and microsoft excel, cookie as to be set for both. You can't save a cookie on a browser and expect the excel application to read from the cookie.

regards
Taha
 
On Sep 23, 2011, at 5:31 PM, MP3HiFi wrote:

> Hello,
> 
> I have a curious handling within my tapestry application. My application has
> a login, which is saved in a cookie. When calling the protected page within
> the browser using the complete url everything is working fine. The cookie is
> found and the user is logged in.
> 
> When calling the same URL outside the browser, i.e. Excel with hyperlink,
> the cookie is not found, the login is, as a result of the missing cookie,
> not executed manually.
> 
> Is there a workaround for that problem.
> 
> Thanks in advance.
> Martin
> 
> --
> View this message in context: http://tapestry.1045711.n5.nabble.com/Missing-cookie-when-calling-URL-outside-browser-tp4833233p4833233.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