• 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 Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Reading cookie value

 
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi i am facing some proble in reading cookie

I have two application in struts in which i have to use SSO for reading data from cookie .I have done in both application but one is working fine but another not.
This is the step which i have follow.
1-In login action class which is my first login class i read that if userid form bean value is null then read data from cookie.
cookie is reading data and then i have set that cookie value in userid form bean and then next process is smae as previous.

means it reads data from userid form bean and validate user by database.

and after validation i set this id in session.

after this on each page it reads data from session.

this is working fine.

but in second application i have follow the same steps cookie is reading data and it set in session but when my home page open and i click any menu to open page then it read data userid from session but here it comes null when i check that session is new or old by isNew() method then it returns true means it is a new session means session is not set. But why it is happning this problem comes when i read data from cookie .
Any one please tell me why this problem is comming
It's urgent

Regards
Amitabh
 
reply
    Bookmark Topic Watch Topic
  • New Topic