0

get a value from Cookie

asked 2008-10-31 23:56:34 +0800

ibsolution gravatar image ibsolution
468 1 1 6

hai,

i search in the forum about how to write and read a cookie from zk framework.

And i found this

1.addCookie
HttpServletResponse response = Executions.getCurrent().getNativeResponse();
Cookie userCookie = new Cookie("user", "xxx123");
response.addCookie(userCookie);

2.getCookie
Cookie [] cookies = Executions.getCurrent().getNativeRequest().getCookies();

but both code got and error step 1 "Executions.getCurrent().getNativeResponse() " should i need to cast that object first ?

step 2 ".getCookies" undefined object.

any solution ?


TIA,

Andy Susanto

delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2008-11-01 00:53:03 +0800

ibsolution gravatar image ibsolution
468 1 1 6

hai,

ok i solve again.

and the answer yes you need to cast first

regards,

Andy Susanto

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2008-10-31 23:56:34 +0800

Seen: 248 times

Last updated: Nov 01 '08

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More