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
-
containsField(String)
- Returns true if the form contains the named non-file
field.
-
containsFile(String)
- Returns true if the form contains the named
file field.
-
fieldCount()
- Returns the number of fields in the form.
-
fieldNames()
- Returns an Enumeration of the names of non-file fields
in the form.
-
fileCount()
- Returns the number of file fields in the form.
-
fileNames()
- Returns an Enumeration of the names of file fields in the form.
-
getField(String)
- Gets the value of the named non-file field, or null if it
is not present.
-
getFile(String)
- Gets the value of the named file field, or null if it
is not present.
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.
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.
fieldCount
public static int fieldCount()
- Returns the number of fields in the form.
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
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.
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.
fileCount
public static int fileCount()
- Returns the number of file fields in the form.
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