Java
  Home arrow Java arrow Page 3 - The JSP Files (part 6): State Of Grace
Dev Shed Forums  
Administration  
AJAX  
Apache  
BrainDump  
DHTML  
Flash  
Java  
JavaScript  
Multimedia  
MySQL  
Oracle  
Perl  
PHP  
Practices  
Python  
Reviews  
Security  
Smartphone Development  
Style-Sheets  
Web Services  
XML  
Zend  
Zope  
Mobile Linux  
App Generation ROI  
IBM® developerWorks  
Forums Sitemap  
E-Commerce Hosting  
Linux Web Hosting  
Managed Hosting  
Small Business Hosting  
VPS Hosting  
Weekly Newsletter

 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid  
Request Media Kit
Contact Us  
Site Map  
Privacy Policy  
Support  
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
Google.com  
JAVA

The JSP Files (part 6): State Of Grace
By: Vikram Vaswani and Harish Kamath, (c) Melonfire
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: starstarstarstarstar / 5
    2001-03-26


    Table of Contents:
  • The JSP Files (part 6): State Of Grace
  • Wasted, Dude!
  • A Few Ground Rules
  • Learning To Write...
  • ...And Read
  • What's In A Name?
  • Plan B
  • Session Dissection
  • Access Denied

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      error-file:tidyout.log Del.ici.ous error-file:tidyout.log Digg
      error-file:tidyout.log Blink error-file:tidyout.log Simpy
      error-file:tidyout.log Google error-file:tidyout.log Spurl
      error-file:tidyout.log Y! MyWeb error-file:tidyout.log Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article

     
     
    ADVERTISEMENT


    The JSP Files (part 6): State Of Grace - A Few Ground Rules
    ( Page 3 of 9 )

    Since cookies are used to record information about your activities on a particular site, they can only be read by the site that created them. For example, Yahoo and Deja.com store your username in a cookie on your hard drive and use this information to automatically fill in log-in forms the next time you visit their Web sites. It's kinda like going to a chic restaurant, and having the maitre'd call you by name (something which hasn't happened to us of late!)

    Before getting into the nitty-gritty of cookie technology, a few ground rules are in order:

    1. A single domain cannot set more than twenty cookies. A single cookie cannot exceed 4 KB in size. The maximum number of cookies that may be set is 300.

    2. The most common method of transmitting a cookie to a client is via the "Set-Cookie" HTTP header.

    3. A cookie usually possesses five types of attributes.

    The first of these is a NAME=VALUE pair, used to store information such as a username, email address or credit-card number. The NAME is a string used to identify the cookie, while the VALUE is the data to be stored in the cookie. For example,

    clarkkent=superman

    The EXPIRES attribute defines the date on which the cookie is automatically removed from the system. The date must be in the format "weekday, dd-mon-yy hh:mm:ss GMT". For example,

    expires="Sun, 31-Dec-2030 17:51:06 GMT"

    Cookies without a specifically defined expiry date remain active for so long as the browser remains open, and are destroyed once the browser is closed. You can delete an existing cookie be setting this attribute to a date in the past.

    The PATH attribute is used to set the top-level directory on the Web server from which cookies can be accessed. In most cases, this is set to

    path=/

    to ensure that the cookie can be accessed by each and every document on the server.

    The DOMAIN attribute is used to specify the domain which the cookie is linked to, and the SECURE attribute indicates that a cookie should only be set if there exists a secure protocol between the browser and the server.

    4. Of all the five attributes, the first is the only one that is not optional.

    5. Every good browser offers users the option to disable cookies. If a user decides to exercise his or her right to do so, your cookies will not be stored, and any attempt to access them will fail. Users who do this are usually career criminals or tax evaders.

     
     
    >>> More Java Articles          >>> More By Vikram Vaswani and Harish Kamath, (c) Melonfire
     

       

    JAVA ARTICLES

    - Exception Handling Techniques in Java
    - More About Multithreading in Java
    - The Basics of Multiple Threads in Java
    - Data Access Using Spring Framework JDBC
    - New Object Initialization in Java
    - Adding Images With iTextSharp
    - Adding Columns With iTextSharp
    - Creating Simple PDF Files With iTextSharp
    - The Spring Framework: Understanding IoC
    - Introducing the Spring Framework
    - Java Classes
    - Completing the Syntactic Comparison of Java ...
    - Syntactic Comparison of Java and C/C++
    - Java Statements
    - Conditionals, Expressions and Other Java Ope...





    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek