I have added a cookie to the system with the Servlet and now i want to retrieve it thru JSP is it possible
Sure, no problem.
However, remember that the default behavior of cookies is that they get returned by the browser only for requests in the same apparent directory (ie same URL up to the rightmost slash) or in subdirectories. Thus, a cookie sent to
http://host/webappPrefix/foo/SomeServlet would not get returned to
http://host/webappPrefix/bar/SomeFile.jsp. Use setPath to change this. Eg, the following tells the browser to return the cookie on any request back to the server:
Cheers-
- Marty