aspose file tools*
The moose likes Struts and the fly likes Handling cookies Path for specific subdomain ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Handling cookies Path for specific subdomain ?" Watch "Handling cookies Path for specific subdomain ?" New topic
Author

Handling cookies Path for specific subdomain ?

Albert Kam
Ranch Hand

Joined: Oct 18, 2007
Posts: 58
Hello all,

I would like to achieve 2 sessions (2 cookies) for each of the URL :
http://myhost/my_struts_app
and
http://myhost/my_struts_app/my_struts_submodule

Is there anyway i can achieve this using struts (either in version 1 or 2) ?

Because i found this line :
Cookies can also be limited in scope to a specific domain, subdomain or path on the web server which created them.
in http://en.wikipedia.org/wiki/HTTP_cookie

If this is achievable, then i can use 2 tabs in a single instance of firefox, to access those 2 URLs, without having to setup different firefox profiles

Please help ..

Thank you,
Albert Kam


Be nice !
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

Two cookies != two sessions: you'll still be in the same HTTP session.

Setting cookies isn't particularly Struts-specific; I don't recall what support, if any, S1 has for cookie handling. S2 has a CookieAware interceptor (or something like that) that'll put a map of cookies into an action.

I'm not sure that it's going to do what you think it's going to do, though.
Albert Kam
Ranch Hand

Joined: Oct 18, 2007
Posts: 58
Dear David,

Thank you for your reply.

Regards,
Albert Kam
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Handling cookies Path for specific subdomain ?