aspose file tools
The moose likes Servlets and the fly likes How to set cookie in root domain? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply Bookmark "How to set cookie in root domain?" Watch "How to set cookie in root domain?" New topic
Author

How to set cookie in root domain?

James Hodgkiss
Ranch Hand

Joined: Jan 22, 2004
Posts: 401
Does anyone know how do I would get my servlet at http://myserver.com/mywebapp/myservlet to set a cookie with a path value = "/" instead of the usual path = "/mywebapp/" ?
Vinoth Thirunavukarasu
Ranch Hand

Joined: Dec 18, 2008
Posts: 164

Use cookie.setPath method.
For more detail refer this class
Cookie


Java Best Practices
Linux Best Practices
Amortization Calculator

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to set cookie in root domain?
 
Similar Threads
Cookie question
Multiple Cookies with the name 'JSESSIONID' getting created
Troubles with cookies in JSF
Cookies
jsf problem , java.lang.RuntimeException: Cannot find FacesContext error