View RSS Feed

Field

Servlet fields

  1. Hidden Fields

    by , 01-01-2012 at 04:07 PM
    Hidden Fields present on the pages are able to maintain the state. They are not able to be seen on browsers. The servers treat both non-hidden and hidden fields in similar way.

    <INPUT type=”hidden” name=”Firstname” value=”Peter”>
    <INPUT type=”hidden” name=”Lastname” value=”Smith”>

    The hidden field’s disadvantage is that they might expose certain private or sensitive information, to others.

    Updated 01-14-2012 at 05:56 PM by Servlet

    Categories
    Field
  2. Reading Request Headers from Servlets

    by , 11-28-2011 at 06: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
    ...