This class does not directly provide access to the parameter value. For such services, please see {@link RequestParser} and {@link ModelFromRequest}.
This class separates request parameters into two kinds : file upload request parameters, and all others (here called "regular" request parameters).
Regular Request Parameters
Regular request parameters are associated with :
File Upload Request Parameters
Files are uploaded using forms having :
In addition, note that the Servlet API does not have extensive services for processing file upload parameters. It is likely best to use a third party tool for that task.
File upload request parameters, as represented by this class, have only a name associated with them, and no regular expression. This is because WEB4J cannot perform hard validation on the value of a file upload parameter - since the user may select any file whatsoever, validation of file contents can only be treated as a soft validation. If there is a problem, the response to the user must be polished, as part of the normal operation of the application.
As an example, an {@link Action} might perform soft validation on a file upload parameter for these items :
Naming Convention
Parameter names are usually not arbitrary in WEB4J. Instead, a simple convention is used which allows for automated mapping between request parameter names and corresponding getXXX methods of Model Objects (see {@link hirondelle.web4j.ui.tag.Populate}). For example, a parameter named 'Birth Date' (or 'birthDate') is mapped to a method named getBirthDate() when prepopulating a form with the contents of a Model Object. (The 'Birth Date' naming style is recommended, since it has this advantage : when messages regarding form input are presented to the user, the control name may be used directly, without trivial mapping of a 'coder-friendly' parameter name into more user-friendly text.)
Some parameters - notably those passed to Template.jsp - are not processed at all by the Controller, but are used directly in JSPs instead. Such parameters do not undergo hard validation by the {@link hirondelle.web4j.security.ApplicationFirewall}, and are not represented by this class.
See {@link java.util.regex.Pattern} for more information on regular expressions.
|
|
|
|
|
|
|
|