• 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

HttpSession and Cookies!!!

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 140
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic