Cookie using webviewer

Please can anyone tell me what Im doing wrong here

I am trying to create a cookie and read it back

Thanks