View RSS Feed


Servlet Cookies

  1. Cookies

    by , 01-01-2012 at 05:08 PM
    A cookie is that test of piece which can be stored on the hard disk of a user by web server. Information is being stored on user machine by the help of cookies which is later retrieved. Such information pieces are stored as “name value pairs”. Cookie data gets moved in this way:

    • If URL of a site is typed in the browser, browser will be sending its requests to web server. When this is done by the web browser cookie file is looked for at the machine which has been set by the URL. ...
  2. Reading Request Headers from Servlets

    by , 11-28-2011 at 07:31 PM
    It is relatively easy to read headers. All you need to do is call the getHeader method of HttpServletRequest. If the specified header exists, the servlet returns a String, if not the servlet will return null. Unlike parameter names, header names are not case sensitive. Although getHeader is a general-purpose way to read incoming headers, there are a couple of headers that are so commonly used that they have special access methods in HttpServletRequest. They are listed below.
    • getCookies