aspose file tools*
The moose likes Servlets and the fly likes HttpSession and Cookies!!! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "HttpSession and Cookies!!!" Watch "HttpSession and Cookies!!!" New topic
Author

HttpSession and Cookies!!!

Tsering Norbu
Greenhorn

Joined: Jun 21, 2001
Posts: 3
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

Joined: Mar 22, 2000
Posts: 12823
    
    5
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

Joined: Jun 22, 2001
Posts: 140
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


Vikas Aggarwal

Founder @
Leads and Deals Limited

www.LeadsAndDeals.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HttpSession and Cookies!!!