All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class WebSite.Servlet.Form

java.lang.Object
   |
   +----WebSite.Servlet.Form

public final class Form
extends Object

The Form class implements WebSite form-related data items. It is purely a static class, it cannot be instantiated. WebSite decodes all form data present in POST requests only. If the form has METHOD=GET, form data will not be available in this package. Note: if more than one field is assigned the same NAME= attribute in the form, or for SELECT_MLTIPLE fields with more than one selection, unique field names are constructed by appending an underscore followed by a number. For example ITEM, then ITEM_1, then ITEM_2, etc.

See Also:
Client, Request, Response, Server, Session

Method Index

 o containsField(String)
Returns true if the form contains the named non-file field.
 o containsFile(String)
Returns true if the form contains the named file field.
 o fieldCount()
Returns the number of fields in the form.
 o fieldNames()
Returns an Enumeration of the names of non-file fields in the form.
 o fileCount()
Returns the number of file fields in the form.
 o fileNames()
Returns an Enumeration of the names of file fields in the form.
 o getField(String)
Gets the value of the named non-file field, or null if it is not present.
 o getFile(String)
Gets the value of the named file field, or null if it is not present.

Methods

 o containsField
 public static boolean containsField(String name)
Returns true if the form contains the named non-file field.

Parameters:
name - The name of the non-file field as given in the NAME= attribute in the form. See the note regarding repeated field names.
 o getField
 public static String getField(String name)
Gets the value of the named non-file field, or null if it is not present.

Parameters:
name - The name of the field as given in the NAME= attribute in the form.
 o fieldCount
 public static int fieldCount()
Returns the number of fields in the form.

 o fieldNames
 public static Enumeration fieldNames()
Returns an Enumeration of the names of non-file fields in the form. The Enumeration returns String objects which contain the names of non-file fields present in the form sent by the user-agent (browser).

See Also:
FormFieldEnumeration, Enumeration
 o containsFile
 public static boolean containsFile(String name)
Returns true if the form contains the named file field.

Parameters:
name - The name of the file field as given in the NAME= attribute in the form.
 o getFile
 public static FormFile getFile(String name)
Gets the value of the named file field, or null if it is not present.

Parameters:
name - The name of the field as given in the NAME= attribute in the form.
 o fileCount
 public static int fileCount()
Returns the number of file fields in the form.

 o fileNames
 public static Enumeration fileNames()
Returns an Enumeration of the names of file fields in the form. The Enumeration returns String objects which contain the names of file fields present in the form sent by the user-agent (browser).


All Packages  Class Hierarchy  This Package  Previous  Next  Index