I want to access a cookie by a
JSP with EL expression however I can't get the value part.. Here my
servlet code that creates a cookie;
And the code extract from JSP
Cookie easy access :
- Not working
I can get the cookie with the code below however I need to learn how to access only EL expression thank you for your answers...
//cookie reader code
Cookie[] cookies = request.getKookies(); // changed intentionaly to getKookies() (C->K) because there is a hacker control for specific method!!!
java ranch ruless.
for(Cookie c : cookies)
{
if(c.getName().equals("username"))
{
String username = c.getValue();
response.getWriter().print("welcome " + username);
break;
}
}
[ December 12, 2008: Message edited by: Anut Walidera ]