• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Jeanne Boyarsky
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Junilu Lacar
  • Knute Snortum
Saloon Keepers:
  • Ron McLeod
  • Ganesh Patekar
  • Tim Moores
  • Pete Letkeman
  • Stephan van Hulst
Bartenders:
  • Carey Brown
  • Tim Holloway
  • Joe Ess

How to access Cookie value using EL  RSS feed

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Mike lothar
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Giju George

Mike
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!