Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

HttpSession and Cookies!!!

 
Tsering Norbu
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi guys,
This happened to be my first message into this forum but i have been surfing these site for quite a long time, i found it fruitful so i thought to put up question, i m wondering if anyone could please tell HOW CAN WE ADD HTTPSESSION AND COOKIES INTO OUR WEB PAGE OR HTML FILE..does this sound stupid? thank you..hope someone will respond.
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13074
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you mean how to get a plain web page to store a cookie without using a servlet, you can do it with Javascript. A Javascript statement can set a cookie - I don't remember the exact syntax.
Bill
 
Vikas Aggarwal
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
To add the session or cookies in the java based files like JSP/servlet you can use HttpSession but if you are trying to implement on the HTMl I guess session implementation can't be done; only cookie can be implemented. For that try javascript cookies. These are easy to set and get but only thing you need to consider is Browser and the browser version. Some browsers don't support javascript cookies and some don't support cookie sytaxes. Any way this is a good thing for IE and netscape.
Originally posted by Tsering Norbu:
Hi guys,
This happened to be my first message into this forum but i have been surfing these site for quite a long time, i found it fruitful so i thought to put up question, i m wondering if anyone could please tell HOW CAN WE ADD HTTPSESSION AND COOKIES INTO OUR WEB PAGE OR HTML FILE..does this sound stupid? thank you..hope someone will respond.


------------------
Vikas Aggarwal
Technology Associate
Shakun Global Networks
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic