VAP actually adds the "cookie" http header(s) to the PortletRequest properties collection, according to the JSR168 spec, section PLT.11.1.4. So from within a JSR168 portlet it's quite simple to get the cookies from the RenderRequest.getProperties("cookie").
Code Example:
[...]
Cookie getCookie(String name, PortletRequest request)
{
String [] cookie = null;
for(StringTokenizer st = new StringTokenizer("cookie", "; "); st.hasMoreTokens();)
{
cookie = st.nextToken().split("=");
if(cookie.length == 2 && cookie[0].equals(name))
{
return new Cookie (cookie[0], cookie[1]);
}
}
return null;
}
[...]
source: http://weblogs.asp.net/jdanforth/archive/2005/08/18/422957.aspx
Recent comments
2 weeks 4 days ago
2 weeks 4 days ago
5 weeks 3 days ago
6 weeks 1 day ago
6 weeks 1 day ago
6 weeks 1 day ago
6 weeks 1 day ago
6 weeks 1 day ago
7 weeks 21 hours ago
7 weeks 2 days ago