wood burning stoves 2.0*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes How to access Cookie value using EL Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "How to access Cookie value using EL" Watch "How to access Cookie value using EL" New topic
Author

How to access Cookie value using EL

Mike lothar
Greenhorn

Joined: Nov 16, 2004
Posts: 22
Hi All,
How to access Cookie value using EL. i tried to access cookie using EL its printing characters which are not meaningful.

Thank you
Mike
Giju George
Ranch Hand

Joined: Jun 08, 2004
Posts: 333
The cookies are stored as Map (name -value pairs). So if you create a cookie like :-

Cookie c=new Cookie("c1","My test cookie");
response.addCookie(c);

Then you can access it using the following EL in jsp :-

Cookie :- ${cookie["c1"].value}


Hope this helps


SCJP 1.4, SCWCD 1.4, SCBCD 1.3, SCEA
Mike lothar
Greenhorn

Joined: Nov 16, 2004
Posts: 22
Thank you Giju George

Mike
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to access Cookie value using EL
 
Similar Threads
Doubt in EL Implicit Objects: Cookie
cookie name using EL
getting cookies with EL
how to access request attribute using EL
Cookie access with EL expression